微信小程序 MD5js使用方法,请求接口轮播图
发布时间:2019-12-16 21:37:26作者:admin点击:
作者:woshihaiyong168,来自原文地址
一:MD5 方法js更多md5相关内容,可以查看此帖:MD5加密中文的结果不一致
生成的文件可以放在 utils文件中哦!!!
/** A JavaScript implementation of the RSA Data Security, Inc. MD5 Message* Digest Algorithm, as defined in RFC 1321.* Version 1.1 Copyright (C) Paul Johnston 1999 - 2002.* Code also contributed by Greg Holt* See http://pajhome.org.uk/site/legal.html for details.*//** Add integers, wrapping at 2^32. This uses 16-bit operations internally* to work around bugs in some JS interpreters.*/function safe_add(x, y){var lsw = (x & 0xFFFF) + (y & 0xFFFF)var msw = (x >> 16) + (y >> 16) + (lsw >> 16)return (msw << 16) | (lsw & 0xFFFF)}/** Bitwise rotate a 32-bit number to the left.*/function rol(num, cnt){return (num << cnt) | (num >>> (32 - cnt))}/** These functions implement the four basic operations the algorithm uses.*/function cmn(q, a, b, x, s, t){return safe_add(rol(safe_add(safe_add(a, q), safe_add(x, t)), s), b)}function ff(a, b, c, d, x, s, t){return cmn((b & c) | ((~b) & d), a, b, x, s, t)}function gg(a, b, c, d, x, s, t){return cmn((b & d) | (c & (~d)), a, b, x, s, t)}function hh(a, b,
- 上一篇 : Canvas 基础绘制,时间戳转化为几天前,几小时前
- 下一篇 : 微信小程序左滑删除效果


