https://github.com/klappdev/jefl
Java native erase library
https://github.com/klappdev/jefl
cpp cpp20 cpp23 erasing filesystem java jni-java
Last synced: 2 months ago
JSON representation
Java native erase library
- Host: GitHub
- URL: https://github.com/klappdev/jefl
- Owner: klappdev
- License: mit
- Created: 2022-07-22T07:49:24.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2023-02-26T13:45:14.000Z (almost 3 years ago)
- Last Synced: 2025-06-07T11:02:09.405Z (7 months ago)
- Topics: cpp, cpp20, cpp23, erasing, filesystem, java, jni-java
- Language: C++
- Homepage:
- Size: 6.56 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# jefl
This is simple Java library for secure erase files.
When we remove file, remove only name file but content file stay exist.
Sometimes we want that file content can not be recovery again.
For secure erase file used next steps:
> overwrite content file
> truncate file
> random rename file
> delete file
There are the following methods of overwrite content file:
> Simple method - overwrite 1 pass 0x00 bytes
> DOE method - overwrite 3 pass random, random, "DoE"
> RCMP method - overwrite 3 pass 0x00 ,0xFF, "RCMP"
> OPENBSD method - overwrite 3 pass 0xFF, 0x00, 0xFF bytes
> DOD method - overwrite 7 pass
> Gutmann method - overwrite 35 pass
Using this library developer can erase files in the following way.
```Java
native boolean eraseFile(String path) throws EraseException;
native boolean eraseFile(String path, OverwrideMode mode) throws EraseException;
native boolean eraseFiles(String... paths) throws EraseException;
native boolean eraseFiles(OverwrideMode mode, String... paths) throws EraseException;
native boolean eraseDirectory(String path, boolean recur) throws EraseException;
native boolean eraseDirectory(String path, OverwrideMode mode, boolean recur) throws EraseException;
```
Verified:
Static analizer: clang-tidy
Dynamic analizer: valgrind
Requirements:
Java min version: 11
C++ min version: 20