Encrypt and Decrypt text with Encrypt JS.
Install Encrypt JS with Node JS Package Manager (NPM).
npm install encrypt-node-js
Below are two examples on how to use Encrypt JS.
const EncryptJS = require("encrypt-node-js")
try {
const key = await EncryptJS.generateKey()
const encrypted = await EncryptJS.encrypt(key, "{your_text}")
console.log(encrypted)
} catch (error) {
console.log(error)
}
const EncryptJS = require("encrypt-node-js")
try {
const key = await EncryptJS.generateKey()
const decrypted = await EncryptJS.decrypt(key, "{your_encrypted_text}")
console.log(decrypted)
} catch (error) {
console.log(error)
}
Encrypt JS is licensed with MIT.