/** * [js-md5]{@link https://github.com/emn178/js-md5} * * @namespace md5 * @version 0.4.0 * @author Yi-Cyuan Chen [emn178@gmail.com] * @copyright Yi-Cyuan Chen 2014-2015 * @license MIT */ !function(t){"use strict";function e(t){if(t)c[0]=c[16]=c[1]=c[2]=c[3]=c[4]=c[5]=c[6]=c[7]=c[8]=c[9]=c[10]=c[11]=c[12]=c[13]=c[14]=c[15]=0,this.blocks=c,this.buffer8=r;else if(n){var e=new ArrayBuffer(68);this.buffer8=new Uint8Array(e),this.blocks=new Uint32Array(e)}else this.blocks=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];this.h0=this.h1=this.h2=this.h3=this.start=this.bytes=0,this.finalized=this.hashed=!1,this.first=!0}var h="object"==typeof process&&process.versions&&process.versions.node;h&&(t=global);var r,i=!t.JS_MD5_TEST&&"object"==typeof module&&module.exports,s="function"==typeof define&&define.amd,n=!t.JS_MD5_TEST&&"undefined"!=typeof ArrayBuffer,o="0123456789abcdef".split(""),f=[128,32768,8388608,-2147483648],a=[0,8,16,24],u=["hex","array","digest","buffer"],c=[];if(n){var d=new ArrayBuffer(68);r=new Uint8Array(d),c=new Uint32Array(d)}var l=function(t){return function(h){return new e(!0).update(h)[t]()}},y=function(){var t=l("hex");h&&(t=p(t)),t.create=function(){return new e},t.update=function(e){return t.create().update(e)};for(var r=0;rs;){if(this.hashed&&(this.hashed=!1,f[0]=f[16],f[16]=f[1]=f[2]=f[3]=f[4]=f[5]=f[6]=f[7]=f[8]=f[9]=f[10]=f[11]=f[12]=f[13]=f[14]=f[15]=0),h)if(n)for(i=this.start;o>s&&64>i;++s)u[i++]=e[s];else for(i=this.start;o>s&&64>i;++s)f[i>>2]|=e[s]<s&&64>i;++s)r=e.charCodeAt(s),128>r?u[i++]=r:2048>r?(u[i++]=192|r>>6,u[i++]=128|63&r):55296>r||r>=57344?(u[i++]=224|r>>12,u[i++]=128|r>>6&63,u[i++]=128|63&r):(r=65536+((1023&r)<<10|1023&e.charCodeAt(++s)),u[i++]=240|r>>18,u[i++]=128|r>>12&63,u[i++]=128|r>>6&63,u[i++]=128|63&r);else for(i=this.start;o>s&&64>i;++s)r=e.charCodeAt(s),128>r?f[i>>2]|=r<r?(f[i>>2]|=(192|r>>6)<>2]|=(128|63&r)<r||r>=57344?(f[i>>2]|=(224|r>>12)<>2]|=(128|r>>6&63)<>2]|=(128|63&r)<>2]|=(240|r>>18)<>2]|=(128|r>>12&63)<>2]|=(128|r>>6&63)<>2]|=(128|63&r)<=64?(this.start=i-64,this.hash(),this.hashed=!0):this.start=i}return this}},e.prototype.finalize=function(){if(!this.finalized){this.finalized=!0;var t=this.blocks,e=this.lastByteIndex;t[e>>2]|=f[3&e],e>=56&&(this.hashed||this.hash(),t[0]=t[16],t[16]=t[1]=t[2]=t[3]=t[4]=t[5]=t[6]=t[7]=t[8]=t[9]=t[10]=t[11]=t[12]=t[13]=t[14]=t[15]=0),t[14]=this.bytes<<3,this.hash()}},e.prototype.hash=function(){var t,e,h,r,i,s,n=this.blocks;this.first?(t=n[0]-680876937,t=(t<<7|t>>>25)-271733879<<0,r=(-1732584194^2004318071&t)+n[1]-117830708,r=(r<<12|r>>>20)+t<<0,h=(-271733879^r&(-271733879^t))+n[2]-1126478375,h=(h<<17|h>>>15)+r<<0,e=(t^h&(r^t))+n[3]-1316259209,e=(e<<22|e>>>10)+h<<0):(t=this.h0,e=this.h1,h=this.h2,r=this.h3,t+=(r^e&(h^r))+n[0]-680876936,t=(t<<7|t>>>25)+e<<0,r+=(h^t&(e^h))+n[1]-389564586,r=(r<<12|r>>>20)+t<<0,h+=(e^r&(t^e))+n[2]+606105819,h=(h<<17|h>>>15)+r<<0,e+=(t^h&(r^t))+n[3]-1044525330,e=(e<<22|e>>>10)+h<<0),t+=(r^e&(h^r))+n[4]-176418897,t=(t<<7|t>>>25)+e<<0,r+=(h^t&(e^h))+n[5]+1200080426,r=(r<<12|r>>>20)+t<<0,h+=(e^r&(t^e))+n[6]-1473231341,h=(h<<17|h>>>15)+r<<0,e+=(t^h&(r^t))+n[7]-45705983,e=(e<<22|e>>>10)+h<<0,t+=(r^e&(h^r))+n[8]+1770035416,t=(t<<7|t>>>25)+e<<0,r+=(h^t&(e^h))+n[9]-1958414417,r=(r<<12|r>>>20)+t<<0,h+=(e^r&(t^e))+n[10]-42063,h=(h<<17|h>>>15)+r<<0,e+=(t^h&(r^t))+n[11]-1990404162,e=(e<<22|e>>>10)+h<<0,t+=(r^e&(h^r))+n[12]+1804603682,t=(t<<7|t>>>25)+e<<0,r+=(h^t&(e^h))+n[13]-40341101,r=(r<<12|r>>>20)+t<<0,h+=(e^r&(t^e))+n[14]-1502002290,h=(h<<17|h>>>15)+r<<0,e+=(t^h&(r^t))+n[15]+1236535329,e=(e<<22|e>>>10)+h<<0,t+=(h^r&(e^h))+n[1]-165796510,t=(t<<5|t>>>27)+e<<0,r+=(e^h&(t^e))+n[6]-1069501632,r=(r<<9|r>>>23)+t<<0,h+=(t^e&(r^t))+n[11]+643717713,h=(h<<14|h>>>18)+r<<0,e+=(r^t&(h^r))+n[0]-373897302,e=(e<<20|e>>>12)+h<<0,t+=(h^r&(e^h))+n[5]-701558691,t=(t<<5|t>>>27)+e<<0,r+=(e^h&(t^e))+n[10]+38016083,r=(r<<9|r>>>23)+t<<0,h+=(t^e&(r^t))+n[15]-660478335,h=(h<<14|h>>>18)+r<<0,e+=(r^t&(h^r))+n[4]-405537848,e=(e<<20|e>>>12)+h<<0,t+=(h^r&(e^h))+n[9]+568446438,t=(t<<5|t>>>27)+e<<0,r+=(e^h&(t^e))+n[14]-1019803690,r=(r<<9|r>>>23)+t<<0,h+=(t^e&(r^t))+n[3]-187363961,h=(h<<14|h>>>18)+r<<0,e+=(r^t&(h^r))+n[8]+1163531501,e=(e<<20|e>>>12)+h<<0,t+=(h^r&(e^h))+n[13]-1444681467,t=(t<<5|t>>>27)+e<<0,r+=(e^h&(t^e))+n[2]-51403784,r=(r<<9|r>>>23)+t<<0,h+=(t^e&(r^t))+n[7]+1735328473,h=(h<<14|h>>>18)+r<<0,e+=(r^t&(h^r))+n[12]-1926607734,e=(e<<20|e>>>12)+h<<0,i=e^h,t+=(i^r)+n[5]-378558,t=(t<<4|t>>>28)+e<<0,r+=(i^t)+n[8]-2022574463,r=(r<<11|r>>>21)+t<<0,s=r^t,h+=(s^e)+n[11]+1839030562,h=(h<<16|h>>>16)+r<<0,e+=(s^h)+n[14]-35309556,e=(e<<23|e>>>9)+h<<0,i=e^h,t+=(i^r)+n[1]-1530992060,t=(t<<4|t>>>28)+e<<0,r+=(i^t)+n[4]+1272893353,r=(r<<11|r>>>21)+t<<0,s=r^t,h+=(s^e)+n[7]-155497632,h=(h<<16|h>>>16)+r<<0,e+=(s^h)+n[10]-1094730640,e=(e<<23|e>>>9)+h<<0,i=e^h,t+=(i^r)+n[13]+681279174,t=(t<<4|t>>>28)+e<<0,r+=(i^t)+n[0]-358537222,r=(r<<11|r>>>21)+t<<0,s=r^t,h+=(s^e)+n[3]-722521979,h=(h<<16|h>>>16)+r<<0,e+=(s^h)+n[6]+76029189,e=(e<<23|e>>>9)+h<<0,i=e^h,t+=(i^r)+n[9]-640364487,t=(t<<4|t>>>28)+e<<0,r+=(i^t)+n[12]-421815835,r=(r<<11|r>>>21)+t<<0,s=r^t,h+=(s^e)+n[15]+530742520,h=(h<<16|h>>>16)+r<<0,e+=(s^h)+n[2]-995338651,e=(e<<23|e>>>9)+h<<0,t+=(h^(e|~r))+n[0]-198630844,t=(t<<6|t>>>26)+e<<0,r+=(e^(t|~h))+n[7]+1126891415,r=(r<<10|r>>>22)+t<<0,h+=(t^(r|~e))+n[14]-1416354905,h=(h<<15|h>>>17)+r<<0,e+=(r^(h|~t))+n[5]-57434055,e=(e<<21|e>>>11)+h<<0,t+=(h^(e|~r))+n[12]+1700485571,t=(t<<6|t>>>26)+e<<0,r+=(e^(t|~h))+n[3]-1894986606,r=(r<<10|r>>>22)+t<<0,h+=(t^(r|~e))+n[10]-1051523,h=(h<<15|h>>>17)+r<<0,e+=(r^(h|~t))+n[1]-2054922799,e=(e<<21|e>>>11)+h<<0,t+=(h^(e|~r))+n[8]+1873313359,t=(t<<6|t>>>26)+e<<0,r+=(e^(t|~h))+n[15]-30611744,r=(r<<10|r>>>22)+t<<0,h+=(t^(r|~e))+n[6]-1560198380,h=(h<<15|h>>>17)+r<<0,e+=(r^(h|~t))+n[13]+1309151649,e=(e<<21|e>>>11)+h<<0,t+=(h^(e|~r))+n[4]-145523070,t=(t<<6|t>>>26)+e<<0,r+=(e^(t|~h))+n[11]-1120210379,r=(r<<10|r>>>22)+t<<0,h+=(t^(r|~e))+n[2]+718787259,h=(h<<15|h>>>17)+r<<0,e+=(r^(h|~t))+n[9]-343485551,e=(e<<21|e>>>11)+h<<0,this.first?(this.h0=t+1732584193<<0,this.h1=e-271733879<<0,this.h2=h-1732584194<<0,this.h3=r+271733878<<0,this.first=!1):(this.h0=this.h0+t<<0,this.h1=this.h1+e<<0,this.h2=this.h2+h<<0,this.h3=this.h3+r<<0)},e.prototype.hex=function(){this.finalize();var t=this.h0,e=this.h1,h=this.h2,r=this.h3;return o[t>>4&15]+o[15&t]+o[t>>12&15]+o[t>>8&15]+o[t>>20&15]+o[t>>16&15]+o[t>>28&15]+o[t>>24&15]+o[e>>4&15]+o[15&e]+o[e>>12&15]+o[e>>8&15]+o[e>>20&15]+o[e>>16&15]+o[e>>28&15]+o[e>>24&15]+o[h>>4&15]+o[15&h]+o[h>>12&15]+o[h>>8&15]+o[h>>20&15]+o[h>>16&15]+o[h>>28&15]+o[h>>24&15]+o[r>>4&15]+o[15&r]+o[r>>12&15]+o[r>>8&15]+o[r>>20&15]+o[r>>16&15]+o[r>>28&15]+o[r>>24&15]},e.prototype.toString=e.prototype.hex,e.prototype.digest=function(){this.finalize();var t=this.h0,e=this.h1,h=this.h2,r=this.h3;return[255&t,t>>8&255,t>>16&255,t>>24&255,255&e,e>>8&255,e>>16&255,e>>24&255,255&h,h>>8&255,h>>16&255,h>>24&255,255&r,r>>8&255,r>>16&255,r>>24&255]},e.prototype.array=e.prototype.digest,e.prototype.buffer=function(){this.finalize();var t=new ArrayBuffer(16),e=new Uint32Array(t);return e[0]=this.h0,e[1]=this.h1,e[2]=this.h2,e[3]=this.h3,t};var b=y();i?module.exports=b:(t.md5=b,s&&define(function(){return b}))}(this);