0.0.3 • Published 13 years ago
kruptos v0.0.3
What's kruptos ?
- Encrypt and decrypt node files with a simple command-line
- Provides a wrapper to 'require' encrypted node modules
Installation
The recommended way is through the excellent NPM:
$ npm install -g kruptosCommand line usage
Encrypt demo/module1.js and demo/module2.js with 'mysecretkey' key :
$ kruptos -e -k mysecretkey demo/module*.jsDecrypt demo/module1.js.encrypted and demo/module2.js.encrypted with 'mysecretkey' key :
$ kruptos -d -k mysecretkey demo/module*.encryptedModule require usage
Simply add the kruptos module at the top of your main script (app.js for example) :
require('kruptos');Run application as usual :
$ node appRun application and encrypt all module dependencies :
$ node app --encrypt --key mysecretkeyRun application directly with encrypted module dependencies :
$ node app --key mysecretkeyRun application and decrypt all module dependencies :
$ node app --decrypt --key mysecretkeyDemo
Use the samples provided in the demo directory.
There are two encrypted modules based on sources directory.
Try to execute the main script, and see how it works :
$ node demo/main --key demokeyTo decrypt the modules during the execution :
$ node demo/main --decrypt --key demokeyTo encrypt the modules during the execution :
$ node demo/main --encrypt --key demokeyEnjoy !