Crypto.min.js 3.2 KB

1
  1. function Crypto(){function o(n,t){var r=c(n[0],o=n[1],u=n[2],e=n[3],t[0],7,-680876936),e=c(e,r,o,u,t[1],12,-389564586),u=c(u,e,r,o,t[2],17,606105819),o=c(o,u,e,r,t[3],22,-1044525330);r=c(r,o,u,e,t[4],7,-176418897),e=c(e,r,o,u,t[5],12,1200080426),u=c(u,e,r,o,t[6],17,-1473231341),o=c(o,u,e,r,t[7],22,-45705983),r=c(r,o,u,e,t[8],7,1770035416),e=c(e,r,o,u,t[9],12,-1958414417),u=c(u,e,r,o,t[10],17,-42063),o=c(o,u,e,r,t[11],22,-1990404162),r=c(r,o,u,e,t[12],7,1804603682),e=c(e,r,o,u,t[13],12,-40341101),u=c(u,e,r,o,t[14],17,-1502002290),r=i(r,o=c(o,u,e,r,t[15],22,1236535329),u,e,t[1],5,-165796510),e=i(e,r,o,u,t[6],9,-1069501632),u=i(u,e,r,o,t[11],14,643717713),o=i(o,u,e,r,t[0],20,-373897302),r=i(r,o,u,e,t[5],5,-701558691),e=i(e,r,o,u,t[10],9,38016083),u=i(u,e,r,o,t[15],14,-660478335),o=i(o,u,e,r,t[4],20,-405537848),r=i(r,o,u,e,t[9],5,568446438),e=i(e,r,o,u,t[14],9,-1019803690),u=i(u,e,r,o,t[3],14,-187363961),o=i(o,u,e,r,t[8],20,1163531501),r=i(r,o,u,e,t[13],5,-1444681467),e=i(e,r,o,u,t[2],9,-51403784),u=i(u,e,r,o,t[7],14,1735328473),r=l(r,o=i(o,u,e,r,t[12],20,-1926607734),u,e,t[5],4,-378558),e=l(e,r,o,u,t[8],11,-2022574463),u=l(u,e,r,o,t[11],16,1839030562),o=l(o,u,e,r,t[14],23,-35309556),r=l(r,o,u,e,t[1],4,-1530992060),e=l(e,r,o,u,t[4],11,1272893353),u=l(u,e,r,o,t[7],16,-155497632),o=l(o,u,e,r,t[10],23,-1094730640),r=l(r,o,u,e,t[13],4,681279174),e=l(e,r,o,u,t[0],11,-358537222),u=l(u,e,r,o,t[3],16,-722521979),o=l(o,u,e,r,t[6],23,76029189),r=l(r,o,u,e,t[9],4,-640364487),e=l(e,r,o,u,t[12],11,-421815835),u=l(u,e,r,o,t[15],16,530742520),r=a(r,o=l(o,u,e,r,t[2],23,-995338651),u,e,t[0],6,-198630844),e=a(e,r,o,u,t[7],10,1126891415),u=a(u,e,r,o,t[14],15,-1416354905),o=a(o,u,e,r,t[5],21,-57434055),r=a(r,o,u,e,t[12],6,1700485571),e=a(e,r,o,u,t[3],10,-1894986606),u=a(u,e,r,o,t[10],15,-1051523),o=a(o,u,e,r,t[1],21,-2054922799),r=a(r,o,u,e,t[8],6,1873313359),e=a(e,r,o,u,t[15],10,-30611744),u=a(u,e,r,o,t[6],15,-1560198380),o=a(o,u,e,r,t[13],21,1309151649),r=a(r,o,u,e,t[4],6,-145523070),e=a(e,r,o,u,t[11],10,-1120210379),u=a(u,e,r,o,t[2],15,718787259),o=a(o,u,e,r,t[9],21,-343485551),n[0]=h(r,n[0]),n[1]=h(o,n[1]),n[2]=h(u,n[2]),n[3]=h(e,n[3])}function f(n,t,r,e,u,o){return t=h(h(t,n),h(e,o)),h(t<<u|t>>>32-u,r)}function c(n,t,r,e,u,o,c){return f(t&r|~t&e,n,t,u,o,c)}function i(n,t,r,e,u,o,c){return f(t&e|r&~e,n,t,u,o,c)}function l(n,t,r,e,u,o,c){return f(t^r^e,n,t,u,o,c)}function a(n,t,r,e,u,o,c){return f(r^(t|~e),n,t,u,o,c)}function t(n){/[\x80-\xFF]/.test(n)&&(n=unescape(encodeURI(n))),txt="";let t=n.length,r=[1732584193,-271733879,-1732584194,271733878],e;for(e=64;e<=n.length;e+=64)o(r,function(n){let t=[],r;for(r=0;r<64;r+=4)t[r>>2]=n.charCodeAt(r)+(n.charCodeAt(r+1)<<8)+(n.charCodeAt(r+2)<<16)+(n.charCodeAt(r+3)<<24);return t}(n.substring(e-64,e)));n=n.substring(e-64);var u=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];for(e=0;e<n.length;e++)u[e>>2]|=n.charCodeAt(e)<<(e%4<<3);if(u[e>>2]|=128<<(e%4<<3),55<e)for(o(r,u),e=0;e<16;e++)u[e]=0;return u[14]=8*t,o(r,u),r}let e="0123456789abcdef".split("");function r(t){for(let n=0;n<t.length;n++)t[n]=function(n){let t="",r=0;for(;r<4;r++)t+=e[n>>8*r+4&15]+e[n>>8*r&15];return t}(t[n]);return t.join("")}function h(n,t){return n+t&4294967295}return{md5:function(n){return r(t(n))}}}