azcryptor
v1.0.9
Published
Secure hybrid file encryption CLI tool using AES + RSA
Maintainers
Readme
___ ______ __
/ |____ / ____/______ ______ / /_____ _____
/ /| /_ / / / / ___/ / / / __ \/ __/ __ \/ ___/
/ ___ |/ /_/ /___/ / / /_/ / /_/ / /_/ /_/ / /
/_/ |_/___/\____/_/ \__, / .___/\__/\____/_/
/____/_/
([email protected])AzCryptor
Hybrid AES-256 + RSA-2048 CLI for encrypting and decrypting files at rest.
Persian guide: README.fa.md
Features
- Hybrid encryption: AES-256-CBC for file data, RSA-2048 for the session key
- Streaming I/O for large files
- Terminal progress bar with percent, speed, and ETA
- Final report table with input, output, and meta paths
- Optional meta directory for decrypt (
-m) base64ifyhelper for transfer/import formats
Install
Requires Node.js 18+.
npm install -g azcryptorSecurity note
Every encrypt run generates a new key chain. Keep all meta files or recovery is impossible:
[output-name].key— AES key wrapped with RSA[output-name].iv— initialization vector[output-name].private.pem— RSA private key
Do not ship private keys with the encrypted file. AzCryptor encrypts file contents only, not names or paths.
Usage
Encrypt
azcryptor encrypt -i ./data.txt -o ./data.enc -m ./meta
# alias: azcryptor enc ...Writes ./data.enc and meta files under ./meta:
data.enc.keydata.enc.ivdata.enc.private.pem
Decrypt
By default, meta files are read beside the encrypted file:
azcryptor decrypt -i ./data.enc -o ./data.txt
# alias: azcryptor dec ...Or point to the meta directory used during encryption:
azcryptor decrypt -i ./data.enc -o ./data.txt -m ./metaBase64 utility
azcryptor base64ify ./data.encCreates:
data.enc.b64data.enc.import.csvdata.enc.import.json
CLI help
azcryptor --help
azcryptor encrypt --help
azcryptor decrypt --help
azcryptor base64ify --helpRunning azcryptor with no arguments also prints help.
Output layout
input/
myFile.rar
output/
myFile.rar.enc
meta/
myFile.rar.enc.key
myFile.rar.enc.iv
myFile.rar.enc.private.pem
decrypted/
myFile_restored.rarCommand reference
| Command | Required | Optional | Description |
| :--- | :--- | :--- | :--- |
| encrypt / enc | -i, -o, -m | | Encrypt file and write meta |
| decrypt / dec | -i, -o | -m | Decrypt file (meta beside input or from -m) |
| base64ify | <file> | | Encode file to base64/CSV/JSON |
Install from Git (no npm package)
Install the global azcryptor CLI from the GitHub source instead of the npm registry package:
# Windows (PowerShell / CMD)
curl -L -o install-from-git.bat https://raw.githubusercontent.com/AliZolfaghar/AzCryptor/main/install-from-git.bat
install-from-git.bat
# Linux / macOS
curl -fsSL -o install-from-git.sh https://raw.githubusercontent.com/AliZolfaghar/AzCryptor/main/install-from-git.sh
chmod +x install-from-git.sh
./install-from-git.shOptional arguments:
# custom destination
install-from-git.bat D:\tools\AzCryptor
./install-from-git.sh ~/tools/AzCryptor
# custom destination + repo URL
install-from-git.bat D:\tools\AzCryptor https://github.com/AliZolfaghar/AzCryptor.git
./install-from-git.sh ~/tools/AzCryptor https://github.com/AliZolfaghar/AzCryptor.gitDefault clone path: %USERPROFILE%\AzCryptor / ~/AzCryptor.
Requires: git, Node.js 18+, and the npm CLI (only for local dependencies — not for downloading the azcryptor package from the registry).
Local install and test (maintainers)
Install/update the global azcryptor CLI from this folder and run a quick smoke test:
# Windows
install-local.bat
# Linux / macOS
chmod +x install-local.sh
./install-local.shPublishing (maintainers)
Set the version in package.json, then:
# Windows
publish.bat
# Linux / macOS
chmod +x publish.sh
./publish.shScripts run npm install, check login, dry-run pack, ask for confirmation, then npm publish.
License
Apache-2.0
