Package Exports
- secure-rm
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (secure-rm) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
Completely erases files by making recovery impossible.
⚠️ WARNING ⚠️ THIS TOOL IS STILL IN DEVELOPEMENT, USE IT AT YOUR OWN RISKS! The documentation is not complete either.
Installing
You can use this package in two different ways, the npm module version:
$ npm install secure-rm --saveOr the command-line version:
$ npm install secure-rm -gGetting started
If you want your application to delete specific files with a single pass (method 1), use this code snippet:
const rm = require('secure-rm')
rm('./folder/*.js', (err) => {
if (err) throw err
console.log('Success!')
})If you want to delete files on the fly, just use the command line tool:
$ secure-rm ./folder/*.jsDocumentation / Usage
npm module
rm(path, [method,[ callback)It will search for files if the path is a glob pattern, or the folder/file specified. By default, method 1 is chosen. (British HMG IS5(Baseline)) You can pick another one, they are described below. The function (asynchronous) then run the callback when all the files has been removed.
Command line tool
$ secure-rm <PATHS> [OPTIONS]The tool supports file globbing and multiple arguments like:
$ secure-rm ./folder/*.js ./garbage ./file.jsThe different flags are detailed in the built-in help:
$ secure-rm -h
USAGE
$ secure-rm PATH
OPTIONS
-f, --force avoid checks
-h, --help show CLI help
-m, --method=0|1|2|3|4|5 erasure method
-t, --table show the methods table
-v, --version show CLI versionMethods
| ID | Name | Passes | Description |
|---|---|---|---|
| 0 | Pseudorandom data | 1 | The fastest wiping scheme. Your data is overwritten with random data (if you use a CSPRNG the data is indistinguishable from random noise.) |
| 1 | British HMG IS5(Baseline) | 1 | Your data is overwritten with zeroes. |
| 2 | Russian GOST P50739-95 | 2 | GOST P50739-95 wiping scheme calls for a single pass of zeroes followed by a single pass of random data. |
| 3 | British HMG IS5 (Enhanced) | 3 | British HMG IS5 (Enhanced) is a three pass overwriting algorithm: first pass – with zeroes, second pass – with ones and the last pass with random data. |
| 4 | US Army AR380-19 | 3 | AR380-19 is data wiping scheme specified and published by the U.S. Army. AR380-19 is three pass overwriting algorithm: first pass – with random data, second with a random byte and the third pass with the complement of the 2nd pass. |
| 5 | US Department of Defense DoD 5220.22-M (E) | 3 | DoD 5220.22-M (E) is a three pass overwriting algorithm: first pass – with zeroes, second pass – with ones and the last pass – with random data. |
Developing
Main packages
- oclif : CLI Framework
- Inquirer.js : interactive command line user interfaces
Prerequisites
You need to have Git and npm installed on your system.
Setting up Dev
You'll need to clone the repository and install the required packages. Just execute these commands:
git clone https://github.com/oganexon/secure-rm.git
cd secure-rm/
npm installYou are ready to develop.
Deploying / Publishing
give instructions on how to build and release a new version In case there's some step you have to take that publishes this project to a server, this is the right time to state it.
packagemanager deploy your-project -s server.com -u username -p passwordAnd again you'd need to tell what the previous code actually does.
Versioning
We use SemVer for versioning. For the versions available, see the link to tags on this repository.
Configuration
Here you should write what are all of the configurations a user can enter when using the project.
Tests
Describe and show how to run the tests with code examples. Explain what these tests test and why.
Give an exampleStyle guide
Explain your code style and show how to check it.
Api Reference
If the api is external, link to api documentation. If not describe your api including authentication methods as well as explaining all the endpoints with their required parameters.
Database
Explaining what database (and version) has been used. Provide download links. Documents your database design and schemas, relations etc...
Licensing
State what the license is and how to find the text version of the license.