This repository has been archived by the owner on Jan 10, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
/
md5.min.js
executable file
·11 lines (11 loc) · 4.65 KB
/
md5.min.js
1
2
3
4
5
6
7
8
9
10
11
/*! js-methods (https://github.com/harrydeluxe/js-methods) */
(function(){var h={o:0,k:"",e:8,hex_md5:function(c){return this.m(this.g(this.h(c),c.length*this.e))},b64_md5:function(c){return this.l(this.g(this.h(c),c.length*this.e))},str_md5:function(c){return this.n(this.g(this.h(c),c.length*this.e))},hex_hmac_md5:function(c,g){return this.m(this.j(c,g))},b64_hmac_md5:function(c,g){return this.l(this.j(c,g))},str_hmac_md5:function(c,g){return this.n(this.j(c,g))},core_md5:function(c,g){c[g>>5]|=128<<g%32;c[(g+64>>>9<<4)+14]=g;for(var a=1732584193,b=-271733879,
d=-1732584194,e=271733878,f=0;f<c.length;f+=16)var h=a,i=b,j=d,k=e,a=this.a(a,b,d,e,c[f+0],7,-680876936),e=this.a(e,a,b,d,c[f+1],12,-389564586),d=this.a(d,e,a,b,c[f+2],17,606105819),b=this.a(b,d,e,a,c[f+3],22,-1044525330),a=this.a(a,b,d,e,c[f+4],7,-176418897),e=this.a(e,a,b,d,c[f+5],12,1200080426),d=this.a(d,e,a,b,c[f+6],17,-1473231341),b=this.a(b,d,e,a,c[f+7],22,-45705983),a=this.a(a,b,d,e,c[f+8],7,1770035416),e=this.a(e,a,b,d,c[f+9],12,-1958414417),d=this.a(d,e,a,b,c[f+10],17,-42063),b=this.a(b,
d,e,a,c[f+11],22,-1990404162),a=this.a(a,b,d,e,c[f+12],7,1804603682),e=this.a(e,a,b,d,c[f+13],12,-40341101),d=this.a(d,e,a,b,c[f+14],17,-1502002290),b=this.a(b,d,e,a,c[f+15],22,1236535329),a=this.b(a,b,d,e,c[f+1],5,-165796510),e=this.b(e,a,b,d,c[f+6],9,-1069501632),d=this.b(d,e,a,b,c[f+11],14,643717713),b=this.b(b,d,e,a,c[f+0],20,-373897302),a=this.b(a,b,d,e,c[f+5],5,-701558691),e=this.b(e,a,b,d,c[f+10],9,38016083),d=this.b(d,e,a,b,c[f+15],14,-660478335),b=this.b(b,d,e,a,c[f+4],20,-405537848),a=this.b(a,
b,d,e,c[f+9],5,568446438),e=this.b(e,a,b,d,c[f+14],9,-1019803690),d=this.b(d,e,a,b,c[f+3],14,-187363961),b=this.b(b,d,e,a,c[f+8],20,1163531501),a=this.b(a,b,d,e,c[f+13],5,-1444681467),e=this.b(e,a,b,d,c[f+2],9,-51403784),d=this.b(d,e,a,b,c[f+7],14,1735328473),b=this.b(b,d,e,a,c[f+12],20,-1926607734),a=this.c(a,b,d,e,c[f+5],4,-378558),e=this.c(e,a,b,d,c[f+8],11,-2022574463),d=this.c(d,e,a,b,c[f+11],16,1839030562),b=this.c(b,d,e,a,c[f+14],23,-35309556),a=this.c(a,b,d,e,c[f+1],4,-1530992060),e=this.c(e,
a,b,d,c[f+4],11,1272893353),d=this.c(d,e,a,b,c[f+7],16,-155497632),b=this.c(b,d,e,a,c[f+10],23,-1094730640),a=this.c(a,b,d,e,c[f+13],4,681279174),e=this.c(e,a,b,d,c[f+0],11,-358537222),d=this.c(d,e,a,b,c[f+3],16,-722521979),b=this.c(b,d,e,a,c[f+6],23,76029189),a=this.c(a,b,d,e,c[f+9],4,-640364487),e=this.c(e,a,b,d,c[f+12],11,-421815835),d=this.c(d,e,a,b,c[f+15],16,530742520),b=this.c(b,d,e,a,c[f+2],23,-995338651),a=this.d(a,b,d,e,c[f+0],6,-198630844),e=this.d(e,a,b,d,c[f+7],10,1126891415),d=this.d(d,
e,a,b,c[f+14],15,-1416354905),b=this.d(b,d,e,a,c[f+5],21,-57434055),a=this.d(a,b,d,e,c[f+12],6,1700485571),e=this.d(e,a,b,d,c[f+3],10,-1894986606),d=this.d(d,e,a,b,c[f+10],15,-1051523),b=this.d(b,d,e,a,c[f+1],21,-2054922799),a=this.d(a,b,d,e,c[f+8],6,1873313359),e=this.d(e,a,b,d,c[f+15],10,-30611744),d=this.d(d,e,a,b,c[f+6],15,-1560198380),b=this.d(b,d,e,a,c[f+13],21,1309151649),a=this.d(a,b,d,e,c[f+4],6,-145523070),e=this.d(e,a,b,d,c[f+11],10,-1120210379),d=this.d(d,e,a,b,c[f+2],15,718787259),b=
this.d(b,d,e,a,c[f+9],21,-343485551),a=this.f(a,h),b=this.f(b,i),d=this.f(d,j),e=this.f(e,k);return[a,b,d,e]},md5_cmn:function(c,g,a,b,d,e){return this.f(this.q(this.f(this.f(g,c),this.f(b,e)),d),a)},md5_ff:function(c,g,a,b,d,e,f){return this.i(g&a|~g&b,c,g,d,e,f)},md5_gg:function(c,g,a,b,d,e,f){return this.i(g&b|a&~b,c,g,d,e,f)},md5_hh:function(c,g,a,b,d,e,f){return this.i(g^a^b,c,g,d,e,f)},md5_ii:function(c,g,a,b,d,e,f){return this.i(a^(g|~b),c,g,d,e,f)},core_hmac_md5:function(c,g){var a=this.h(c);
16<a.length&&(a=this.g(a,c.length*this.e));for(var b=Array(16),d=Array(16),e=0;16>e;e++)b[e]=a[e]^909522486,d[e]=a[e]^1549556828;a=this.g(b.concat(this.h(g)),512+g.length*this.e);return this.g(d.concat(a),640)},safe_add:function(c,g){var a=(c&65535)+(g&65535);return(c>>16)+(g>>16)+(a>>16)<<16|a&65535},bit_rol:function(c,g){return c<<g|c>>>32-g},str2binl:function(c){for(var g=[],a=(1<<this.e)-1,b=0;b<c.length*this.e;b+=this.e)g[b>>5]|=(c.charCodeAt(b/this.e)&a)<<b%32;return g},binl2str:function(c){for(var g=
"",a=(1<<this.e)-1,b=0;b<32*c.length;b+=this.e)g+=String.fromCharCode(c[b>>5]>>>b%32&a);return g},binl2hex:function(c){for(var g=this.o?"0123456789ABCDEF":"0123456789abcdef",a="",b=0;b<4*c.length;b++)a+=g.charAt(c[b>>2]>>8*(b%4)+4&15)+g.charAt(c[b>>2]>>8*(b%4)&15);return a},binl2b64:function(c){for(var g="",a=0;a<4*c.length;a+=3)for(var b=(c[a>>2]>>8*(a%4)&255)<<16|(c[a+1>>2]>>8*((a+1)%4)&255)<<8|c[a+2>>2]>>8*((a+2)%4)&255,d=0;4>d;d++)g=8*a+6*d>32*c.length?g+this.k:g+"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(b>>
6*(3-d)&63);return g}};String.prototype.p||(String.prototype.p=function(){return h.r(this)})})();