使用JavaScript加密任何基于Web的应用程序的登录详细信息(用户名和密码)的最佳方法是什么? [英] What is the best way to encrypt login details (username and password) of any web based application using JavaScript?
问题描述
在客户端使用JavaScript加密任何基于Web的应用程序的登录详细信息(用户名和密码)的最佳方法是什么?
What is the best way to encrypt the login details (username and password) of any web based application using JavaScript at client side?
我的要求是使用JavaScript加密Web应用程序登录页面的用户名和密码,并且该加密的数据需要在该过程的后续阶段进一步使用.
My requirement is to encrypt the username and password of the login page of the web application using JavaScript and this encrypted data needs to be used further at a later stage of the process.
任何帮助都是有意义的.
Any help would be appreciable.
关于...
推荐答案
Client side: you can use some of the functionality of crypto-js. Also, you will most likely not be able to use it later on because while encrypting, a "salt" would be added to your variable and hashed together with it - rendering it a compare only value (using the hash comparing function)
建议还是在后端加密数据.
It is advisable to encrypt data on your back-end though.
这篇关于使用JavaScript加密任何基于Web的应用程序的登录详细信息(用户名和密码)的最佳方法是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!