Javascript - Best way to encrypt data with password

前端 未结 3 715
庸人自扰
庸人自扰 2021-02-10 07:08

I\'m creating a server which can store cookies on the web that will contain application settings. The server will accept any data, but I want to encrypt all the settings before

3条回答
  •  悲哀的现实
    2021-02-10 07:40

    I'd recommend using AES encryption in your JavaScript code. See Javascript AES encryption for libraries and links. The trouble you'll have is picking a key that is only available on the client side. Perhaps you can prompt the user? Or hash together some client system information that's not sent to the server.

提交回复
热议问题