1.0.2 • Published 4 years ago

encrypt-decrypt-it v1.0.2

Weekly downloads
4
License
ISC
Repository
-
Last release
4 years ago

Encryption and decryption are possible using this module. To see how to use this module with the syntax in details visit our article about encrypt-decrypt-module.

Usage

Include the module:

var edi = require('encrypt-decrypt-it');

Encrypt our string:

encrypted_string = edi.encryptIt('Here my string', 'MY_PASSWORD');
console.log(encrypted_string);

Decrypt the encrypted string to get original string:

decrypted_string = edi.decryptIt(encrypted_string, 'MY_PASSWORD');
console.log(decrypted_string);

Well, these are the example only with required parameters. There is also an optional parameter for both encryptIt() and decryptIt() methods which contains the cipher algorithm. By default, it set to "aes-128-cbc".