Add end-to-end encryption with custom passphrase.
Use the AES Encryption from crypto-js
# Plain text encryption
var CryptoJS = require("crypto-js");
// Encrypt
var ciphertext = CryptoJS.AES.encrypt('my message', 'secret key 123').toString();
// Decrypt
var bytes = CryptoJS.AES.decrypt(ciphertext, 'secret key 123');
var originalText = bytes.toString(CryptoJS.enc.Utf8);
console.log(originalText); // 'my message'
store the encrypted text to the DB and add a flag, passphrase: true ask user to give the passphrase to decode the text and show.
Add end-to-end encryption with custom passphrase.
Use the AES Encryption from
crypto-jsstore the encrypted text to the DB and add a flag,
passphrase: trueask user to give the passphrase to decode the text and show.