Krypt uses encryption best practices to produce very secure, portable JSON objects using a simple shared key.
npm install -g krypt
krypt --encrypt ./path/to/file.json --secret someSecretValue --out ./path/to/new/encrypted.out
krypt --decrypt ./path/to/new/encrypted.out --secret someSecretValue --out ./path/to/file.json
var krypt = require('krypt');
var encryptedSync = krypt.encrypt('Input Value', 'someSecretValue');
krypt.encrypt(encrypted, 'someSecretValue', function (err, encryptedAsync) {
// async encrypt
});
var krypt = require('krypt');
var plainTextSync = krypt.decrypt(encrypted, 'someSecretValue');
krypt.decrypt(encrypted, 'someSecretValue', function (err, plainTextAsync) {
// async decrypt
});
Krypt tries to incorporate current encryption best practices into a simple to use module. As such, Krypt uses the following:
- AES 256
- CBC
- Key Stretching w/ PBKDF2 @ 128,000 iterations (default)
- Random IV / encrypted value
- Random salt / encrypted value
- sha512 digest