endecrypt-nhanngo
v0.1.3
Published
Encrypt a object to string and descript a string to object
Downloads
11
Readme
Encrypt and decrypt
Encrypt a object to a token string and decrypt token string to object
Installation
npm install endecrypt-nngo
Example
Encrypt an object then decrypt it.
const rsa = require('.endecrypt-nngo');
// test data
const testData = {
hero: "sniper",
level: 10
}
let encrypted = rsa.encrypt(testData);
console.log('encrypted: ', encrypted);
let decrypted = rsa.decrypt(encrypted);
console.log('decrypted: ', decrypted);