enc-x
v2.0.0
Published
Secure AES-256-GCM file encryption & decryption CLI
Downloads
447
Readme
enc-x
Encrypt and decrypt any file with a password. Fast, secure, works on files of any size.
The command automatically detects whether to encrypt or decrypt based on the file extension.
Install
npm install -g enc-xUsage
Encrypt
enc-x <file> -k <password>enc-x video.mp4 -k "mypassword"
# → video.mp4.enc-xDecrypt
enc-x <file.enc-x> -k <password>enc-x video.mp4.enc-x -k "mypassword"
# → video.mp4Custom output path
enc-x report.pdf -k "pass" -o /secure/report.pdf.enc-x
enc-x report.pdf.enc-x -k "pass" -o ./report.pdfOptions
| Option | Short | Description |
| ------------------ | ----- | ------------------- |
| --key <password> | -k | Password (required) |
| --output <path> | -o | Custom output path |
| --help | -h | Show help |
| --version | -v | Show version |
Wrong password
If the password is wrong, the output file is deleted and you'll see:
✖ Invalid password or corrupted fileHow it works
- Pass any file → encrypts it and adds
.enc-xextension - Pass a
.enc-xfile → decrypts it and restores the original filename - Encryption: AES-256-GCM
- Key derivation: PBKDF2-SHA512, 100,000 iterations, random salt per file
- Streaming I/O — no memory issues with large files
