As the project needs to encrypt a js variable value on the client and then send it to the server for verification, I checked the md5 encryption method in js, js itself does not have a solution to directly complete an md5 function as in php. However, it is feasible to manually test the md5 encryption method on the Internet, send out a memo and share it with you.
Md5 encryption method file: md5.20.cript.rar
The usage is as follows:
<Script type = "text/javascript" src = "md5.js"> </script>
The following code is called where you need to use MD5 encryption:
<Script type = "text/javascript"> var hash = hex_md5 ('www .phpernote.com '); </script>
Articles you may be interested in
- Base64_encode encryption and decryption in javascript
- Js determines whether the image has been loaded
- Comparison and Analysis of string encoding functions escape, encodeURI, and encodeURIComponent in javascript
- Edit the jQuery select drop-down box (add, delete, modify)
- How to Use jquery. lazyload to dynamically delay page image loading
- Jquery provides the ability to load data as the scroll bar scrolls.
- Js checks whether the image is loaded and obtains the image width.
- JQuery adds Event Response to dynamically generated content (jquery live Method Introduction)