/*
	Copyright (c) 2004-2011, The Dojo Foundation All Rights Reserved.
	Available via Academic Free License >= 2.1 OR the modified BSD license.
	see: http://dojotoolkit.org/license for details
*/


window[esri._dojoScopeName||"dojo"]._xdResourceLoaded(function(_1,_2,_3){return {depends:[["provide","dojox.encoding.digests.SHA1"],["require","dojox.encoding.digests._base"]],defineResource:function(_4,_5,_6){if(!_4._hasResource["dojox.encoding.digests.SHA1"]){_4._hasResource["dojox.encoding.digests.SHA1"]=true;_4.provide("dojox.encoding.digests.SHA1");_4.require("dojox.encoding.digests._base");(function(){var _7=_6.encoding.digests;var _8=8,_9=(1<<_8)-1;function R(n,c){return (n<<c)|(n>>>(32-c));};function FT(t,b,c,d){if(t<20){return (b&c)|((~b)&d);}if(t<40){return b^c^d;}if(t<60){return (b&c)|(b&d)|(c&d);}return b^c^d;};function KT(t){return (t<20)?1518500249:(t<40)?1859775393:(t<60)?-1894007588:-899497514;};function _a(x,_b){x[_b>>5]|=128<<(24-_b%32);x[((_b+64>>9)<<4)+15]=_b;var w=new Array(80),a=1732584193,b=-271733879,c=-1732584194,d=271733878,e=-1009589776;for(var i=0;i<x.length;i+=16){var _c=a,_d=b,_e=c,_f=d,_10=e;for(var j=0;j<80;j++){if(j<16){w[j]=x[i+j];}else{w[j]=R(w[j-3]^w[j-8]^w[j-14]^w[j-16],1);}var t=_7.addWords(_7.addWords(R(a,5),FT(j,b,c,d)),_7.addWords(_7.addWords(e,w[j]),KT(j)));e=d;d=c;c=R(b,30);b=a;a=t;}a=_7.addWords(a,_c);b=_7.addWords(b,_d);c=_7.addWords(c,_e);d=_7.addWords(d,_f);e=_7.addWords(e,_10);}return [a,b,c,d,e];};function _11(_12,key){var wa=_13(key);if(wa.length>16){wa=_a(wa,key.length*_8);}var _14=new Array(16),_15=new Array(16);for(var i=0;i<16;i++){_14[i]=wa[i]^909522486;_15[i]=wa[i]^1549556828;}var _16=_a(_14.concat(_13(_12)),512+_12.length*_8);return _a(_15.concat(_16),512+160);};function _13(s){var wa=[];for(var i=0,l=s.length*_8;i<l;i+=_8){wa[i>>5]|=(s.charCodeAt(i/_8)&_9)<<(32-_8-i%32);}return wa;};function _17(wa){var h="0123456789abcdef",s=[];for(var i=0,l=wa.length*4;i<l;i++){s.push(h.charAt((wa[i>>2]>>((3-i%4)*8+4))&15),h.charAt((wa[i>>2]>>((3-i%4)*8))&15));}return s.join("");};function _18(wa){var s=[];for(var i=0,l=wa.length*32;i<l;i+=_8){s.push(String.fromCharCode((wa[i>>5]>>>(32-_8-i%32))&_9));}return s.join("");};function _19(wa){var p="=",tab="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",s=[];for(var i=0,l=wa.length*4;i<l;i+=3){var t=(((wa[i>>2]>>8*(3-i%4))&255)<<16)|(((wa[i+1>>2]>>8*(3-(i+1)%4))&255)<<8)|((wa[i+2>>2]>>8*(3-(i+2)%4))&255);for(var j=0;j<4;j++){if(i*8+j*6>wa.length*32){s.push(p);}else{s.push(tab.charAt((t>>6*(3-j))&63));}}}return s.join("");};_7.SHA1=function(_1a,_1b){var out=_1b||_7.outputTypes.Base64;var wa=_a(_13(_1a),_1a.length*_8);switch(out){case _7.outputTypes.Raw:return wa;case _7.outputTypes.Hex:return _17(wa);case _7.outputTypes.String:return _18(wa);default:return _19(wa);}};_7.SHA1._hmac=function(_1c,key,_1d){var out=_1d||_7.outputTypes.Base64;var wa=_11(_1c,key);switch(out){case _7.outputTypes.Raw:return wa;case _7.outputTypes.Hex:return _17(wa);case _7.outputTypes.String:return _18(wa);default:return _19(wa);}};})();}}};});