/*! * md5-js v0.0.2 * (c) 2016 hapjs * Released under the MIT License. */ !function(r,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):r.md5=t()}(this,function(){"use strict";function r(r,n){if("undefined"!=typeof r){var o=e.wordsToBytes(t(r,n));return n&&n.asBytes?o:n&&n.asString?i.bytesToString(o):e.bytesToHex(o)}}var t,n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",e={rotl:function(r,t){return r<>>32-t},rotr:function(r,t){return r<<32-t|r>>>t},endian:function(r){if(r.constructor==Number)return 16711935&e.rotl(r,8)|4278255360&e.rotl(r,24);for(var t=0;t0;r--)t.push(Math.floor(256*Math.random()));return t},bytesToWords:function(r){for(var t=[],n=0,e=0;n>>5]|=r[n]<<24-e%32;return t},wordsToBytes:function(r){for(var t=[],n=0;n<32*r.length;n+=8)t.push(r[n>>>5]>>>24-n%32&255);return t},bytesToHex:function(r){for(var t=[],n=0;n>>4).toString(16)),t.push((15&r[n]).toString(16));return t.join("")},hexToBytes:function(r){for(var t=[],n=0;n>>6*(3-i)&63)):t.push("=");return t.join("")},base64ToBytes:function(r){r=r.replace(/[^A-Z0-9+\/]/gi,"");for(var t=[],e=0,o=0;e>>6-2*o);return t}},o={stringToBytes:function(r){return i.stringToBytes(unescape(encodeURIComponent(r)))},bytesToString:function(r){return decodeURIComponent(escape(i.bytesToString(r)))}},i={stringToBytes:function(r){for(var t=[],n=0;n>>24)|4278255360&(u[g]<<24|u[g]>>>8);u[s>>>5]|=128<>>9<<4)+14]=s;for(var d=t._ff,y=t._gg,p=t._hh,l=t._ii,g=0;g>>0,a=a+T>>>0,c=c+b>>>0,h=h+B>>>0}return e.endian([f,a,c,h])},t._ff=function(r,t,n,e,o,i,u){var s=r+(t&n|~t&e)+(o>>>0)+u;return(s<>>32-i)+t},t._gg=function(r,t,n,e,o,i,u){var s=r+(t&e|n&~e)+(o>>>0)+u;return(s<>>32-i)+t},t._hh=function(r,t,n,e,o,i,u){var s=r+(t^n^e)+(o>>>0)+u;return(s<>>32-i)+t},t._ii=function(r,t,n,e,o,i,u){var s=r+(n^(t|~e))+(o>>>0)+u;return(s<>>32-i)+t},t._blocksize=16,t._digestsize=16,r});