1、在utils目录下新建md5.js
在这里,我把md5()这个方法使用export进行了导出,方便在其他地方使用es6 import 引入使用
/*
* JavaScript MD5 1.0.1...MD5 Message
* Digest Algorithm, as defined in RFC 1321....Andrew Kepert, Ydnar, Lostinet
* Distributed under the BSD License
* See http://pajhome.org.uk/crypt/md5...This uses 16-bit operations internally
* to work around bugs in some JS interpreters.
*/
function safe_add...md5_ii(a, b, c, d, x, s, t) {
return md5_cmn(c ^ (b | (~d)), a, b, x, s, t);
}
/*
* Calculate the MD5