//>>built
define("dojox/encoding/digests/SHA1",["./_base"],function(f){function n(b,c){b[c>>5]|=128<<24-c%32;b[(c+64>>9<<4)+15]=c;for(var a=Array(80),d=1732584193,g=-271733879,e=-1732584194,k=271733878,m=-1009589776,p=0;p<b.length;p+=16){for(var w=d,x=g,y=e,z=k,A=m,h=0;80>h;h++){if(16>h)a[h]=b[p+h];else{var l=a[h-3]^a[h-8]^a[h-14]^a[h-16];a[h]=l<<1|l>>>31}l=f;var B=l.addWords,r=f,C=r.addWords,D=d<<5|d>>>27;var E=20>h?g&e|~g&k:40>h?g^e^k:60>h?g&e|g&k|e&k:g^e^k;l=B.call(l,C.call(r,D,E),f.addWords(f.addWords(m,
a[h]),20>h?1518500249:40>h?1859775393:60>h?-1894007588:-899497514));m=k;k=e;e=g<<30|g>>>2;g=d;d=l}d=f.addWords(d,w);g=f.addWords(g,x);e=f.addWords(e,y);k=f.addWords(k,z);m=f.addWords(m,A)}return[d,g,e,k,m]}function q(b){for(var c=[],a=0,d=8*b.length;a<d;a+=8)c[a>>5]|=(b.charCodeAt(a/8)&255)<<24-a%32;return c}function t(b){for(var c=[],a=0,d=4*b.length;a<d;a++)c.push("0123456789abcdef".charAt(b[a>>2]>>8*(3-a%4)+4&15),"0123456789abcdef".charAt(b[a>>2]>>8*(3-a%4)&15));return c.join("")}function u(b){for(var c=
[],a=0,d=32*b.length;a<d;a+=8)c.push(String.fromCharCode(b[a>>5]>>>24-a%32&255));return c.join("")}function v(b){for(var c=[],a=0,d=4*b.length;a<d;a+=3)for(var g=(b[a>>2]>>8*(3-a%4)&255)<<16|(b[a+1>>2]>>8*(3-(a+1)%4)&255)<<8|b[a+2>>2]>>8*(3-(a+2)%4)&255,e=0;4>e;e++)8*a+6*e>32*b.length?c.push("\x3d"):c.push("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(g>>6*(3-e)&63));return c.join("")}f.SHA1=function(b,c){var a=c||f.outputTypes.Base64,d=n(q(b),8*b.length);switch(a){case f.outputTypes.Raw:return d;
case f.outputTypes.Hex:return t(d);case f.outputTypes.String:return u(d);default:return v(d)}};f.SHA1._hmac=function(b,c,a){a=a||f.outputTypes.Base64;var d=q(c);16<d.length&&(d=n(d,8*c.length));var g=Array(16);c=Array(16);for(var e=0;16>e;e++)g[e]=d[e]^909522486,c[e]=d[e]^1549556828;b=n(g.concat(q(b)),512+8*b.length);b=n(c.concat(b),672);switch(a){case f.outputTypes.Raw:return b;case f.outputTypes.Hex:return t(b);case f.outputTypes.String:return u(b);default:return v(b)}};return f.SHA1});