FolderEncryption is a Command Line Interface (CLI) tool designed to encrypt and decrypt directories and files. It provides an easy and efficient way to manage encrypted data with various functionalities.
Ensure you have a key.json
file in the root directory with the following structure:
{
"secretKey": "your-secret-key",
"secretIv": "your-secret-iv"
}
To use the FolderEncryption CLI, navigate to the project directory and run the desired command.
Encrypts all files in the specified source directory and outputs them to the target directory.
node dist/index.js encrypt <source> <target> [options]
Decrypts all files in the specified source directory and outputs them to the target directory.
node dist/index.js decrypt <source> <target> [options]
Cleans the specified target directory by removing all files.
node dist/index.js clean <target>
Encrypts a single file and outputs the encrypted file.
node dist/index.js encrypt-file <input> <output> [options]
Generates a new encryption key and optionally saves it to a file.
node dist/index.js create-key [options]
-d, --debug
: Display debug information during the execution of the command.-s, --save
: Save the generated key to a file (used withcreate-key
command).-key
: Load secret key and IV from file (used withdecrypt
command).