Use MD5 encryption in JS

blueimp_md5

Since there is no md5 encryption function in native javascript, we have to borrow a js md5 encryption plugin hereblueimp_md5


Simple to use

  1. Introduce in HTML file
<script src="js/md5.min.js"></script>
  1. In the application code, calculate the (hexadecimal code) md5 hash of the string by calling the md5 method with the string as a parameter
let hash = md5("value"); // "2063c1608d6e0baf80249c42e2be5804"

//当然我们也嵌套使用
let hash2 = md5(md5('value')); //"5d638088db991347a4403e4ee407a0f7"

Guess you like

Origin blog.csdn.net/weixin_43974265/article/details/112443787