Skip to content

Encrypt the notes with passphrase #10

@4msar

Description

@4msar

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.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions