Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Encrypt the notes with passphrase #10

Open
4msar opened this issue Oct 9, 2023 · 0 comments
Open

Encrypt the notes with passphrase #10

4msar opened this issue Oct 9, 2023 · 0 comments
Assignees

Comments

@4msar
Copy link
Owner

4msar commented Oct 9, 2023

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.

@4msar 4msar assigned 4msar and akib22 and unassigned 4msar Oct 9, 2023
@4msar 4msar changed the title Encrypt the notes Encrypt the notes with passphrase Oct 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants