Encryptor
Library for encrypt and decrypt messages using a secret key.
Installation
npm install --save encryptor-node
Import methods
// As a whole; // Each method;
Encrypting and decrypting a message or object
; ;; // Encrypting;console.logencrypted; // e20f64009fe0daa88...... // Decrypting;console.logresult; // { message: 'This is an very important message' }
Extra Options
The encrypt
function takes an additional optional options
hash consisting of the following:
This is provided to allow the developer somewhat more control over the internals of the library.
The decrypt
function takes an options hash with just the algorithm
key.
The algorithm must be compatible with the built-in node crypto library.