Simple CLI tool to encrypt/decrypt multiple files.
npm install -g quark-crypto
It will install quark-crypto
package globally, so that you can use qcrypto
binary everywhere.
By default, it will encrypt/decrypt all files in the current directory using aes-256-cbc
algorithm and 'sha256' digest.
It will append .encrypted
extension to encrypted files and remove it after decryption.
$ qcrypto <(e)ncrypt|(d)ecrypt> [options]
Command | Alias | Description |
---|---|---|
encrypt |
e |
Encrypt all files in the current directory |
decrypt |
d |
Decrypt all files in the current directory |
Flag | Alias | Type | Description | Default |
---|---|---|---|---|
--algorithm |
-a |
string |
Algorithm used to create the cipher | aes-256-cbc |
--digest |
-d |
string |
HMAC digest algorithm used to derive the key | sha256 |
--extension |
-e |
string |
Extension appended to the encrypted/decrypted files | encrypted |
--folder |
-f |
string |
Folder used to encrypt/decrypt files | ./ |
--password |
-p |
string |
Password used to derive the encryption key. Do not use this option, it will prompt you to enter the password (see examples below). |
null |
$ qcrypto encrypt
? Enter the password *****
File 'example' encrypted
$ qcrypto decrypt
? Enter the password *****
File 'example.encrypted' decrypted
$ qcrypto encrypt --algorithm cast
? Enter the password *****
File 'example' encrypted
$ qcrypto encrypt --digest sha512
? Enter the password *****
File 'example' encrypted
$ qcrypto decrypt --extension custom
? Enter the password *****
File 'example.custom' decrypted
$ qcrypto encrypt --path ./my/custom/path
? Enter the password *****
File 'my/custom/path/example' encrypted
To build the sources with babel
in ./lib
directory :
npm run build
MIT License ยฉ Patrick Heng Fabien Motte