How to encrypt data and save it

Question: How do I encrypt the data and save it, and when I want to, decrypt it with a password?

Repl link:

I’d recommend using the node library crypto for encryption. It is what I used for the voting site I made.

However, I see that your project is client-side, so I’d recommend looking into the Web Crypto API.

Although I’d highly recommend using a back-end for encryption, as it provides security features such as environment variables.

Nonetheless, I hope I’ve answered your question.

1 Like

I already tried using crypto, but for some reason it didn’t work.

Can i see your code pls?

try cryptoJS? Idk I never use js just found it here

Click show files. It’s in index.js