如何使用Javascript将文本框的加密值从客户端发送到服务器端? [英] How to send encrypted value of a textbox from client end to server end using Javascript?

查看:117
本文介绍了如何使用Javascript将文本框的加密值从客户端发送到服务器端?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

从客户端向服务器端发送密码值时,我需要使用javascript加密文本框值并在服务器端接收该加密值。



这里有链接您会找到一个将客户端的文本框加密值发送到服务器端的示例。

我正在尝试实现相同的代码,但这不会将加密的文本框值从静默端发送到服务器端。关于这个我做谷歌,但到目前为止没有找到积极的结果。请帮我解决这个问题。



提前谢谢。

解决方案

有加密和加密,彼此不同,像害羞的土地。即使您需要使用加密技术,加密也不是您需要的加密密码。请查看我过去的答案:

我已经加密了密码但是当我登录时给出了我错了。如何解密 [ ^ ] ,

存储密码值具有安全方式的int sql server [ ^ ],

解密加密密码 [ ^ ]。



此外,理想情况下,应在通过HTTPS协议而非HTTP提供的页面上执行身份验证。请参阅: http://en.wikipedia.org/wiki/Https [ ^ ]。



-SA


如果您在客户端加密密码并将其发送到服务器端,那么这不是一个理想的方法,因为客户端的任何内容都是透明的。用户可以看到代码和加密数据。



所以,我建议你把它带到服务器端并使用一些加密算法加密并存储在数据库中。

While sending password value from client side to server side i need to encrypt textbox value using javascript and receive that encrypted value in the server side.

Here in the link you'll find one example which will send encrypted value of textbox from client end to server end.
I'm trying to implement the same code, but this doesn't send encrypted textbox value from cilent side to server side. I do google regarding this, but no positive result found till now. Kindly help me to resolve this problem.

Thanks in advance.

解决方案

There is encryption and encryption, different from each other like shy from land. Even though you need to use cryptography, the encryption is not what you need for passwords. Please see my past answers:
i already encrypt my password but when i log in it gives me an error. how can decrypte it[^],
storing password value int sql server with secure way[^],
Decryption of Encrypted Password[^].

Also, ideally, authentication should be performed on the page served through HTTPS protocol, not HTTP. Please see: http://en.wikipedia.org/wiki/Https[^].

—SA


If you encrypt password in client side and send it to server side, that would not be an ideal approach as anything is transparent in client side. User can see the code and encrypted data.

So, I would suggest you to take that to server side and encrypt there using some Encryption Algorithm and store in database.


这篇关于如何使用Javascript将文本框的加密值从客户端发送到服务器端?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆