@bridgera-iot/encrypt_decrypt
v1.0.1
Published
@bridgera-iot/encrypt_decrypt ======== A Node.JS simple interface to encrypt and decrypt a text ## Installation
Downloads
141
Keywords
Readme
@bridgera-iot/encrypt_decrypt
A Node.JS simple interface to encrypt and decrypt a text
Installation
Via [npm][1]:
$ npm install @bridgera-iot/encrypt_decrypt
Usage
let {encrypt, decrypt} = require('@bridgera-iot/encrypt_decrypt');
async function test() {
const secret = 'SECRET';
let data = 2065;
let encrypted = await encrypt(data, secret);
console.log("ENCRYPTED: ", encrypted);
let decrypted = await decrypt(encrypted, secret);
console.log("DECRYPTED: ", decrypted);
}
Credits
Written and maintained by [Bikram Mondal].
License
The ISC License