Javascript| Technique | Encryption
md5($_POST['passwd']
This is the PHP general encryption method, passed over and the database originally encrypted MD5 code to compare
And the following method is through JS to achieve the MD5, in fact, this method in many other places have introduced, and yahoo,vbulletin and so on without the use of SSL encrypted login with this method, password encryption
In fact, there are other ways to encrypt some of the methods are also implemented: such as Md4/sha-1
First you're going to
MD5 JS Download Address/
Download a JS code of use
Call:
CODE:
<script type="text/javascript" src="md5.js"></script>
To implement encryption:
CODE:
<script type="text/javascript" >
hash = hex_md5("input string");
</script>
or just in
CODE:
<form >
The advantage of doing this is
CODE:
1.通过这个md5的js生成的代码和php的是一样,减少服务器在md5加密的负担
2.因为密码是直接在客户端就进行加密,不像php要传到服务器端才加密,这样传输过程的安全也得到进一步的加强
I hope these tips will help us.