From c91f2dd625018ceed0ea7ef179c322609324c420 Mon Sep 17 00:00:00 2001 From: Bryan Housel Date: Tue, 26 Apr 2022 16:51:13 -0400 Subject: [PATCH] v1.1.2 --- CHANGELOG.md | 6 ++++++ osmauth.min.js | 2 +- package.json | 2 +- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 290226d..b5fd27a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -15,6 +15,12 @@ _Breaking changes, which may affect downstream projects, are marked with a_ :war [#xx]: https://github.com/osmlab/osm-auth/issues/xx --> +## 1.1.2 +##### 2022-Apr-26 +* Remove ecstatic, to avoid deprecation warnings +* Test on Node 14, 16, 18 + + ## 1.1.1 ##### 2021-May-24 * Remove xtend, to avoid deprecation warnings diff --git a/osmauth.min.js b/osmauth.min.js index a00c7c6..ca1b01e 100644 --- a/osmauth.min.js +++ b/osmauth.min.js @@ -1 +1 @@ -!function(f){"object"==typeof exports&&"undefined"!=typeof module?module.exports=f():"function"==typeof define&&define.amd?define([],f):("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this).osmAuth=f()}(function(){var define,module,exports;return function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var p="function"==typeof require&&require;if(!f&&p)return p(i,!0);if(u)return u(i,!0);throw(p=new Error("Cannot find module '"+i+"'")).code="MODULE_NOT_FOUND",p}p=n[i]={exports:{}},e[i][0].call(p.exports,function(r){return o(e[i][1][r]||r)},p,p.exports,r,e,n,t)}return n[i].exports}for(var u="function"==typeof require&&require,i=0;i>>6&31,128|63&x):x<=65535?output+=String.fromCharCode(224|x>>>12&15,128|x>>>6&63,128|63&x):x<=2097151&&(output+=String.fromCharCode(240|x>>>18&7,128|x>>>12&63,128|x>>>6&63,128|63&x));return output}function safe_add(x,y){var lsw=(65535&x)+(65535&y);return(x>>16)+(y>>16)+(lsw>>16)<<16|65535&lsw}function bit_rol(num,cnt){return num<>>32-cnt}function rstr2hex(input,hexcase){for(var x,hex_tab=hexcase?"0123456789ABCDEF":"0123456789abcdef",output="",i=0,l=input.length;i>>4&15)+hex_tab.charAt(15&x);return output}function binb2rstr(input){for(var l=32*input.length,output="",i=0;i>5]>>>24-i%32&255);return output}function binl2rstr(input){for(var l=32*input.length,output="",i=0;i>5]>>>i%32&255);return output}function rstr2binl(input){for(var l=8*input.length,output=Array(input.length>>2),lo=output.length,i=0;i>5]|=(255&input.charCodeAt(i/8))<>2),lo=output.length,i=0;i>5]|=(255&input.charCodeAt(i/8))<<24-i%32;return output}function rstr2any(input,encoding){for(var q,x,quotient,output,full_length,divisor=encoding.length,remainders=Array(),dividend=Array(Math.ceil(input.length/2)),ld=dividend.length,i=0;i8*input.length?output+=b64pad:output+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(triplet>>>6*(3-j)&63);return output}Hashes={VERSION:"1.0.6",Base64:function(){var tab="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",pad="=",utf8=!0;this.encode=function(input){var i,j,triplet,output="",len=input.length;for(pad=pad||"=",input=utf8?utf8Encode(input):input,i=0;i>>6*(3-j)&63);return output},this.decode=function(input){var i,o1,o2,h3,h4,o3,ac,dec="",arr=[];if(!input)return input;for(i=ac=0,input=input.replace(new RegExp("\\"+pad,"gi"),"");o1=(o3=tab.indexOf(input.charAt(i+=1))<<18|tab.indexOf(input.charAt(i+=1))<<12|(h3=tab.indexOf(input.charAt(i+=1)))<<6|(h4=tab.indexOf(input.charAt(i+=1))))>>16&255,o2=o3>>8&255,o3=255&o3,arr[ac+=1]=64===h3?String.fromCharCode(o1):64===h4?String.fromCharCode(o1,o2):String.fromCharCode(o1,o2,o3),i>>8^"0x"+table.substr(9*y,8);return(-1^crc)>>>0},MD5:function(options){var hexcase=!(!options||"boolean"!=typeof options.uppercase)&&options.uppercase,b64pad=options&&"string"==typeof options.pad?options.pad:"=",utf8=!options||"boolean"!=typeof options.utf8||options.utf8;function rstr(s){return binl2rstr(binl(rstr2binl(s=utf8?utf8Encode(s):s),8*s.length))}function rstr_hmac(key,hash){var bkey,ipad,opad,i;for(key=utf8?utf8Encode(key):key,hash=utf8?utf8Encode(hash):hash,16<(bkey=rstr2binl(key)).length&&(bkey=binl(bkey,8*key.length)),ipad=Array(16),opad=Array(16),i=0;i<16;i+=1)ipad[i]=909522486^bkey[i],opad[i]=1549556828^bkey[i];return hash=binl(ipad.concat(rstr2binl(hash)),512+8*hash.length),binl2rstr(binl(opad.concat(hash),640))}function binl(x,len){var i,olda,oldb,oldc,oldd,a=1732584193,b=-271733879,c=-1732584194,d=271733878;for(x[len>>5]|=128<>>9<<4)]=len,i=0;i>5]|=128<<24-len%32,x[15+(len+64>>9<<4)]=len,i=0;i>>n|X<<32-n}function binb(m,l){var a,b,c,d,e,f,g,h,i,j,T1,T2,HASH=[1779033703,-1150833019,1013904242,-1521486534,1359893119,-1694144372,528734635,1541459225],W=new Array(64);for(m[l>>5]|=128<<24-l%32,m[15+(l+64>>9<<4)]=l,i=0;i>>10,W[j-7]),function(x){return sha256_S(x,7)^sha256_S(x,18)^x>>>3}(W[j-15])),W[j-16]),T1=safe_add(safe_add(safe_add(safe_add(h,function(x){return sha256_S(x,6)^sha256_S(x,11)^sha256_S(x,25)}(e)),function(x,y,z){return x&y^~x&z}(e,f,g)),sha256_K[j]),W[j]),T2=safe_add(function(x){return sha256_S(x,2)^sha256_S(x,13)^sha256_S(x,22)}(a),function(x,y,z){return x&y^x&z^y&z}(a,b,c)),h=g,g=f,f=e,e=safe_add(d,T1),d=c,c=b,b=a,a=safe_add(T1,T2);HASH[0]=safe_add(a,HASH[0]),HASH[1]=safe_add(b,HASH[1]),HASH[2]=safe_add(c,HASH[2]),HASH[3]=safe_add(d,HASH[3]),HASH[4]=safe_add(e,HASH[4]),HASH[5]=safe_add(f,HASH[5]),HASH[6]=safe_add(g,HASH[6]),HASH[7]=safe_add(h,HASH[7])}return HASH}this.hex=function(s){return rstr2hex(rstr(s,utf8))},this.b64=function(s){return rstr2b64(rstr(s,utf8),b64pad)},this.any=function(s,e){return rstr2any(rstr(s,utf8),e)},this.raw=function(s){return rstr(s,utf8)},this.hex_hmac=function(k,d){return rstr2hex(rstr_hmac(k,d))},this.b64_hmac=function(k,d){return rstr2b64(rstr_hmac(k,d),b64pad)},this.any_hmac=function(k,d,e){return rstr2any(rstr_hmac(k,d),e)},this.vm_test=function(){return"900150983cd24fb0d6963f7d28e17f72"===hex("abc").toLowerCase()},this.setUpperCase=function(a){return"boolean"==typeof a&&0,this},this.setPad=function(a){return b64pad=a||b64pad,this},this.setUTF8=function(a){return"boolean"==typeof a&&(utf8=a),this},sha256_K=[1116352408,1899447441,-1245643825,-373957723,961987163,1508970993,-1841331548,-1424204075,-670586216,310598401,607225278,1426881987,1925078388,-2132889090,-1680079193,-1046744716,-459576895,-272742522,264347078,604807628,770255983,1249150122,1555081692,1996064986,-1740746414,-1473132947,-1341970488,-1084653625,-958395405,-710438585,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,-2117940946,-1838011259,-1564481375,-1474664885,-1035236496,-949202525,-778901479,-694614492,-200395387,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,-2067236844,-1933114872,-1866530822,-1538233109,-1090935817,-965641998]},SHA512:function(options){options&&"boolean"==typeof options.uppercase&&options.uppercase;var sha512_k,b64pad=options&&"string"==typeof options.pad?options.pad:"=",utf8=!options||"boolean"!=typeof options.utf8||options.utf8;function rstr(s){return binb2rstr(binb(rstr2binb(s=utf8?utf8Encode(s):s),8*s.length))}function rstr_hmac(key,hash){key=utf8?utf8Encode(key):key,hash=utf8?utf8Encode(hash):hash;var i=0,bkey=rstr2binb(key),ipad=Array(32),opad=Array(32);for(32>5]|=128<<24-(31&len),x[31+(len+128>>10<<5)]=len,l=x.length,i=0;i>>16)+(b.l>>>16)+(s0.l>>>16)+(w3.l>>>16)+(w0>>>16),w2=(65535&s1.h)+(65535&b.h)+(65535&s0.h)+(65535&w3.h)+(w1>>>16),w3=(s1.h>>>16)+(b.h>>>16)+(s0.h>>>16)+(w3.h>>>16)+(w2>>>16);dst.l=65535&w0|w1<<16,dst.h=65535&w2|w3<<16}(W[j],W[j-7],W[j-16]);for(j=0;j<80;j+=1)Ch.l=e.l&f.l^~e.l&g.l,Ch.h=e.h&f.h^~e.h&g.h,int64rrot(r1,e,14),int64rrot(r2,e,18),int64revrrot(r3,e,9),s1.l=r1.l^r2.l^r3.l,s1.h=r1.h^r2.h^r3.h,int64rrot(r1,a,28),int64revrrot(r2,a,2),int64revrrot(r3,a,7),s0.l=r1.l^r2.l^r3.l,s0.h=r1.h^r2.h^r3.h,Maj.l=a.l&b.l^a.l&c.l^b.l&c.l,Maj.h=a.h&b.h^a.h&c.h^b.h&c.h,function(dst,d,w3){var w0=(65535&h.l)+(65535&s1.l)+(65535&Ch.l)+(65535&d.l)+(65535&w3.l),w1=(h.l>>>16)+(s1.l>>>16)+(Ch.l>>>16)+(d.l>>>16)+(w3.l>>>16)+(w0>>>16),w2=(65535&h.h)+(65535&s1.h)+(65535&Ch.h)+(65535&d.h)+(65535&w3.h)+(w1>>>16),w3=(h.h>>>16)+(s1.h>>>16)+(Ch.h>>>16)+(d.h>>>16)+(w3.h>>>16)+(w2>>>16);dst.l=65535&w0|w1<<16,dst.h=65535&w2|w3<<16}(T1,sha512_k[j],W[j]),int64add(T2,s0,Maj),int64copy(h,g),int64copy(g,f),int64copy(f,e),int64add(e,d,T1),int64copy(d,c),int64copy(c,b),int64copy(b,a),int64add(a,T1,T2);int64add(H[0],H[0],a),int64add(H[1],H[1],b),int64add(H[2],H[2],c),int64add(H[3],H[3],d),int64add(H[4],H[4],e),int64add(H[5],H[5],f),int64add(H[6],H[6],g),int64add(H[7],H[7],h)}for(i=0;i<8;i+=1)hash[2*i]=H[i].h,hash[2*i+1]=H[i].l;return hash}function int64(h,l){this.h=h,this.l=l}function int64copy(dst,src){dst.h=src.h,dst.l=src.l}function int64rrot(dst,x,shift){dst.l=x.l>>>shift|x.h<<32-shift,dst.h=x.h>>>shift|x.l<<32-shift}function int64revrrot(dst,x,shift){dst.l=x.h>>>shift|x.l<<32-shift,dst.h=x.l>>>shift|x.h<<32-shift}function int64shr(dst,x,shift){dst.l=x.l>>>shift|x.h<<32-shift,dst.h=x.h>>>shift}function int64add(dst,x,w3){var w0=(65535&x.l)+(65535&w3.l),w1=(x.l>>>16)+(w3.l>>>16)+(w0>>>16),w2=(65535&x.h)+(65535&w3.h)+(w1>>>16),w3=(x.h>>>16)+(w3.h>>>16)+(w2>>>16);dst.l=65535&w0|w1<<16,dst.h=65535&w2|w3<<16}this.hex=function(s){return rstr2hex(rstr(s))},this.b64=function(s){return rstr2b64(rstr(s),b64pad)},this.any=function(s,e){return rstr2any(rstr(s),e)},this.raw=rstr,this.hex_hmac=function(k,d){return rstr2hex(rstr_hmac(k,d))},this.b64_hmac=function(k,d){return rstr2b64(rstr_hmac(k,d),b64pad)},this.any_hmac=function(k,d,e){return rstr2any(rstr_hmac(k,d),e)},this.vm_test=function(){return"900150983cd24fb0d6963f7d28e17f72"===hex("abc").toLowerCase()},this.setUpperCase=function(a){return"boolean"==typeof a&&0,this},this.setPad=function(a){return b64pad=a||b64pad,this},this.setUTF8=function(a){return"boolean"==typeof a&&(utf8=a),this}},RMD160:function(options){options&&"boolean"==typeof options.uppercase&&options.uppercase;var b64pad=options&&"string"==typeof options.pad?options.pa:"=",utf8=!options||"boolean"!=typeof options.utf8||options.utf8,rmd160_r1=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13],rmd160_r2=[5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11],rmd160_s1=[11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6],rmd160_s2=[8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11];function rstr(s){return binl2rstr(binl(rstr2binl(s=utf8?utf8Encode(s):s),8*s.length))}function rstr_hmac(key,hash){key=utf8?utf8Encode(key):key,hash=utf8?utf8Encode(hash):hash;var i,bkey=rstr2binl(key),ipad=Array(16),opad=Array(16);for(16>5]>>>i%32&255);return output}function binl(x,len){var T,j,i,l,A1,B1,C1,D1,E1,A2,B2,C2,D2,E2,h0=1732584193,h1=4023233417,h2=2562383102,h3=271733878,h4=3285377520;for(x[len>>5]|=128<>>9<<4)]=len,l=x.length,i=0;idocument.w=window<\/script>'),storageContainer.close(),storageOwner=storageContainer.w.frames[0].document,storageEl=storageOwner.createElement("div")}catch(e){storageEl=doc.createElement("div"),storageOwner=doc.body}return function(storeFunction){var args=[].slice.call(arguments,0);args.unshift(storageEl),storageOwner.appendChild(storageEl),storageEl.addBehavior("#default#userData"),storageEl.load(storageName),storeFunction.apply(this,args),storageOwner.removeChild(storageEl)}}(),disable=(Global.navigator?Global.navigator.userAgent:"").match(/ (MSIE 8|MSIE 9|MSIE 10)\./);var forbiddenCharsRegex=new RegExp("[!\"#$%&'()*+,/\\\\:;<=>?@[\\]^`{|}~]","g");function fixKey(key){return key.replace(/^\d/,"___$&").replace(forbiddenCharsRegex,"___")}},{"../src/util":9}],16:[function(require,module,exports){var Global=require("../src/util").Global;function sessionStorage(){return Global.sessionStorage}function read(key){return sessionStorage().getItem(key)}module.exports={name:"sessionStorage",read:read,write:function(key,data){return sessionStorage().setItem(key,data)},each:function(fn){for(var i=sessionStorage().length-1;0<=i;i--){var key=sessionStorage().key(i);fn(read(key),key)}},remove:function(key){return sessionStorage().removeItem(key)},clearAll:function(){return sessionStorage().clear()}}},{"../src/util":9}]},{},[1])(1)}); +!function(f){"object"==typeof exports&&"undefined"!=typeof module?module.exports=f():"function"==typeof define&&define.amd?define([],f):("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this).osmAuth=f()}(function(){var define,module,exports;return function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c="function"==typeof require&&require;if(!f&&c)return c(i,!0);if(u)return u(i,!0);throw(f=new Error("Cannot find module '"+i+"'")).code="MODULE_NOT_FOUND",f}c=n[i]={exports:{}},e[i][0].call(c.exports,function(r){return o(e[i][1][r]||r)},c,c.exports,r,e,n,t)}return n[i].exports}for(var u="function"==typeof require&&require,i=0;i>>6&31,128|63&x):x<=65535?output+=String.fromCharCode(224|x>>>12&15,128|x>>>6&63,128|63&x):x<=2097151&&(output+=String.fromCharCode(240|x>>>18&7,128|x>>>12&63,128|x>>>6&63,128|63&x));return output}function safe_add(x,y){var lsw=(65535&x)+(65535&y);return(x>>16)+(y>>16)+(lsw>>16)<<16|65535&lsw}function bit_rol(num,cnt){return num<>>32-cnt}function rstr2hex(input,hexcase){for(var x,hex_tab=hexcase?"0123456789ABCDEF":"0123456789abcdef",output="",i=0,l=input.length;i>>4&15)+hex_tab.charAt(15&x);return output}function binb2rstr(input){for(var l=32*input.length,output="",i=0;i>5]>>>24-i%32&255);return output}function binl2rstr(input){for(var l=32*input.length,output="",i=0;i>5]>>>i%32&255);return output}function rstr2binl(input){for(var l=8*input.length,output=Array(input.length>>2),lo=output.length,i=0;i>5]|=(255&input.charCodeAt(i/8))<>2),lo=output.length,i=0;i>5]|=(255&input.charCodeAt(i/8))<<24-i%32;return output}function rstr2any(input,encoding){for(var q,x,quotient,output,full_length,divisor=encoding.length,remainders=Array(),dividend=Array(Math.ceil(input.length/2)),ld=dividend.length,i=0;i8*input.length?output+=b64pad:output+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(triplet>>>6*(3-j)&63);return output}window=this,freeExports=!(Hashes={VERSION:"1.0.6",Base64:function(){var tab="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",pad="=",utf8=!0;this.encode=function(input){var i,j,triplet,output="",len=input.length;for(pad=pad||"=",input=utf8?utf8Encode(input):input,i=0;i>>6*(3-j)&63);return output},this.decode=function(input){var i,o1,o2,h3,h4,bits,ac,dec="",arr=[];if(!input)return input;for(i=ac=0,input=input.replace(new RegExp("\\"+pad,"gi"),"");o1=(bits=tab.indexOf(input.charAt(i+=1))<<18|tab.indexOf(input.charAt(i+=1))<<12|(h3=tab.indexOf(input.charAt(i+=1)))<<6|(h4=tab.indexOf(input.charAt(i+=1))))>>16&255,o2=bits>>8&255,bits=255&bits,arr[ac+=1]=64===h3?String.fromCharCode(o1):64===h4?String.fromCharCode(o1,o2):String.fromCharCode(o1,o2,bits),i>>8^"0x"+table.substr(9*y,8);return(-1^crc)>>>0},MD5:function(options){var hexcase=!(!options||"boolean"!=typeof options.uppercase)&&options.uppercase,b64pad=options&&"string"==typeof options.pad?options.pad:"=",utf8=!options||"boolean"!=typeof options.utf8||options.utf8;function rstr(s){return binl2rstr(binl(rstr2binl(s=utf8?utf8Encode(s):s),8*s.length))}function rstr_hmac(key,data){var bkey,ipad,opad,i;for(key=utf8?utf8Encode(key):key,data=utf8?utf8Encode(data):data,16<(bkey=rstr2binl(key)).length&&(bkey=binl(bkey,8*key.length)),ipad=Array(16),opad=Array(16),i=0;i<16;i+=1)ipad[i]=909522486^bkey[i],opad[i]=1549556828^bkey[i];return key=binl(ipad.concat(rstr2binl(data)),512+8*data.length),binl2rstr(binl(opad.concat(key),640))}function binl(x,len){var i,olda,oldb,oldc,oldd,a=1732584193,b=-271733879,c=-1732584194,d=271733878;for(x[len>>5]|=128<>>9<<4)]=len,i=0;i>5]|=128<<24-len%32,x[15+(len+64>>9<<4)]=len,i=0;i>>n|X<<32-n}function binb(m,l){var a,b,c,d,e,f,g,h,i,j,T2,x,HASH=[1779033703,-1150833019,1013904242,-1521486534,1359893119,-1694144372,528734635,1541459225],W=new Array(64);for(m[l>>5]|=128<<24-l%32,m[15+(l+64>>9<<4)]=l,i=0;i>>10,W[j-7]),function(x){return sha256_S(x,7)^sha256_S(x,18)^x>>>3}(W[j-15])),W[j-16]),x=safe_add(safe_add(safe_add(safe_add(h,function(x){return sha256_S(x,6)^sha256_S(x,11)^sha256_S(x,25)}(e)),function(x,y,z){return x&y^~x&z}(e,f,g)),sha256_K[j]),W[j]),T2=safe_add(function(x){return sha256_S(x,2)^sha256_S(x,13)^sha256_S(x,22)}(a),function(x,y,z){return x&y^x&z^y&z}(a,b,c)),h=g,g=f,f=e,e=safe_add(d,x),d=c,c=b,b=a,a=safe_add(x,T2);HASH[0]=safe_add(a,HASH[0]),HASH[1]=safe_add(b,HASH[1]),HASH[2]=safe_add(c,HASH[2]),HASH[3]=safe_add(d,HASH[3]),HASH[4]=safe_add(e,HASH[4]),HASH[5]=safe_add(f,HASH[5]),HASH[6]=safe_add(g,HASH[6]),HASH[7]=safe_add(h,HASH[7])}return HASH}this.hex=function(s){return rstr2hex(rstr(s,utf8))},this.b64=function(s){return rstr2b64(rstr(s,utf8),b64pad)},this.any=function(s,e){return rstr2any(rstr(s,utf8),e)},this.raw=function(s){return rstr(s,utf8)},this.hex_hmac=function(k,d){return rstr2hex(rstr_hmac(k,d))},this.b64_hmac=function(k,d){return rstr2b64(rstr_hmac(k,d),b64pad)},this.any_hmac=function(k,d,e){return rstr2any(rstr_hmac(k,d),e)},this.vm_test=function(){return"900150983cd24fb0d6963f7d28e17f72"===hex("abc").toLowerCase()},this.setUpperCase=function(a){return"boolean"==typeof a&&0,this},this.setPad=function(a){return b64pad=a||b64pad,this},this.setUTF8=function(a){return"boolean"==typeof a&&(utf8=a),this},sha256_K=[1116352408,1899447441,-1245643825,-373957723,961987163,1508970993,-1841331548,-1424204075,-670586216,310598401,607225278,1426881987,1925078388,-2132889090,-1680079193,-1046744716,-459576895,-272742522,264347078,604807628,770255983,1249150122,1555081692,1996064986,-1740746414,-1473132947,-1341970488,-1084653625,-958395405,-710438585,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,-2117940946,-1838011259,-1564481375,-1474664885,-1035236496,-949202525,-778901479,-694614492,-200395387,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,-2067236844,-1933114872,-1866530822,-1538233109,-1090935817,-965641998]},SHA512:function(options){options&&"boolean"==typeof options.uppercase&&options.uppercase;var sha512_k,b64pad=options&&"string"==typeof options.pad?options.pad:"=",utf8=!options||"boolean"!=typeof options.utf8||options.utf8;function rstr(s){return binb2rstr(binb(rstr2binb(s=utf8?utf8Encode(s):s),8*s.length))}function rstr_hmac(key,data){key=utf8?utf8Encode(key):key,data=utf8?utf8Encode(data):data;var i=0,bkey=rstr2binb(key),ipad=Array(32),opad=Array(32);for(32>5]|=128<<24-(31&len),x[31+(len+128>>10<<5)]=len,l=x.length,i=0;i>>16)+(b.l>>>16)+(c.l>>>16)+(d.l>>>16)+(w0>>>16),w2=(65535&a.h)+(65535&b.h)+(65535&c.h)+(65535&d.h)+(w1>>>16),a=(a.h>>>16)+(b.h>>>16)+(c.h>>>16)+(d.h>>>16)+(w2>>>16);dst.l=65535&w0|w1<<16,dst.h=65535&w2|a<<16}(W[j],s1,W[j-7],s0,W[j-16]);for(j=0;j<80;j+=1)Ch.l=e.l&f.l^~e.l&g.l,Ch.h=e.h&f.h^~e.h&g.h,int64rrot(r1,e,14),int64rrot(r2,e,18),int64revrrot(r3,e,9),s1.l=r1.l^r2.l^r3.l,s1.h=r1.h^r2.h^r3.h,int64rrot(r1,a,28),int64revrrot(r2,a,2),int64revrrot(r3,a,7),s0.l=r1.l^r2.l^r3.l,s0.h=r1.h^r2.h^r3.h,Maj.l=a.l&b.l^a.l&c.l^b.l&c.l,Maj.h=a.h&b.h^a.h&c.h^b.h&c.h,function(dst,a,b,c,d,e){var w0=(65535&a.l)+(65535&b.l)+(65535&c.l)+(65535&d.l)+(65535&e.l),w1=(a.l>>>16)+(b.l>>>16)+(c.l>>>16)+(d.l>>>16)+(e.l>>>16)+(w0>>>16),w2=(65535&a.h)+(65535&b.h)+(65535&c.h)+(65535&d.h)+(65535&e.h)+(w1>>>16),a=(a.h>>>16)+(b.h>>>16)+(c.h>>>16)+(d.h>>>16)+(e.h>>>16)+(w2>>>16);dst.l=65535&w0|w1<<16,dst.h=65535&w2|a<<16}(T1,h,s1,Ch,sha512_k[j],W[j]),int64add(T2,s0,Maj),int64copy(h,g),int64copy(g,f),int64copy(f,e),int64add(e,d,T1),int64copy(d,c),int64copy(c,b),int64copy(b,a),int64add(a,T1,T2);int64add(H[0],H[0],a),int64add(H[1],H[1],b),int64add(H[2],H[2],c),int64add(H[3],H[3],d),int64add(H[4],H[4],e),int64add(H[5],H[5],f),int64add(H[6],H[6],g),int64add(H[7],H[7],h)}for(i=0;i<8;i+=1)hash[2*i]=H[i].h,hash[2*i+1]=H[i].l;return hash}function int64(h,l){this.h=h,this.l=l}function int64copy(dst,src){dst.h=src.h,dst.l=src.l}function int64rrot(dst,x,shift){dst.l=x.l>>>shift|x.h<<32-shift,dst.h=x.h>>>shift|x.l<<32-shift}function int64revrrot(dst,x,shift){dst.l=x.h>>>shift|x.l<<32-shift,dst.h=x.l>>>shift|x.h<<32-shift}function int64shr(dst,x,shift){dst.l=x.l>>>shift|x.h<<32-shift,dst.h=x.h>>>shift}function int64add(dst,x,y){var w0=(65535&x.l)+(65535&y.l),w1=(x.l>>>16)+(y.l>>>16)+(w0>>>16),w2=(65535&x.h)+(65535&y.h)+(w1>>>16),x=(x.h>>>16)+(y.h>>>16)+(w2>>>16);dst.l=65535&w0|w1<<16,dst.h=65535&w2|x<<16}this.hex=function(s){return rstr2hex(rstr(s))},this.b64=function(s){return rstr2b64(rstr(s),b64pad)},this.any=function(s,e){return rstr2any(rstr(s),e)},this.raw=rstr,this.hex_hmac=function(k,d){return rstr2hex(rstr_hmac(k,d))},this.b64_hmac=function(k,d){return rstr2b64(rstr_hmac(k,d),b64pad)},this.any_hmac=function(k,d,e){return rstr2any(rstr_hmac(k,d),e)},this.vm_test=function(){return"900150983cd24fb0d6963f7d28e17f72"===hex("abc").toLowerCase()},this.setUpperCase=function(a){return"boolean"==typeof a&&0,this},this.setPad=function(a){return b64pad=a||b64pad,this},this.setUTF8=function(a){return"boolean"==typeof a&&(utf8=a),this}},RMD160:function(options){options&&"boolean"==typeof options.uppercase&&options.uppercase;var b64pad=options&&"string"==typeof options.pad?options.pa:"=",utf8=!options||"boolean"!=typeof options.utf8||options.utf8,rmd160_r1=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13],rmd160_r2=[5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11],rmd160_s1=[11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6],rmd160_s2=[8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11];function rstr(s){return binl2rstr(binl(rstr2binl(s=utf8?utf8Encode(s):s),8*s.length))}function rstr_hmac(key,data){key=utf8?utf8Encode(key):key,data=utf8?utf8Encode(data):data;var i,bkey=rstr2binl(key),ipad=Array(16),opad=Array(16);for(16>5]>>>i%32&255);return output}function binl(x,len){var T,j,i,l,A1,B1,C1,D1,E1,A2,B2,C2,D2,E2,h0=1732584193,h1=4023233417,h2=2562383102,h3=271733878,h4=3285377520;for(x[len>>5]|=128<>>9<<4)]=len,l=x.length,i=0;idocument.w=window<\/script>'),storageContainer.close(),storageOwner=storageContainer.w.frames[0].document,storageEl=storageOwner.createElement("div")}catch(e){storageEl=doc.createElement("div"),storageOwner=doc.body}return function(storeFunction){var args=[].slice.call(arguments,0);args.unshift(storageEl),storageOwner.appendChild(storageEl),storageEl.addBehavior("#default#userData"),storageEl.load(storageName),storeFunction.apply(this,args),storageOwner.removeChild(storageEl)}}(),disable=(require.navigator?require.navigator.userAgent:"").match(/ (MSIE 8|MSIE 9|MSIE 10)\./);var forbiddenCharsRegex=new RegExp("[!\"#$%&'()*+,/\\\\:;<=>?@[\\]^`{|}~]","g");function fixKey(key){return key.replace(/^\d/,"___$&").replace(forbiddenCharsRegex,"___")}},{"../src/util":9}],16:[function(require,module,exports){var Global=require("../src/util").Global;function sessionStorage(){return Global.sessionStorage}function read(key){return sessionStorage().getItem(key)}module.exports={name:"sessionStorage",read:read,write:function(key,data){return sessionStorage().setItem(key,data)},each:function(fn){for(var i=sessionStorage().length-1;0<=i;i--){var key=sessionStorage().key(i);fn(read(key),key)}},remove:function(key){return sessionStorage().removeItem(key)},clearAll:function(){return sessionStorage().clear()}}},{"../src/util":9}]},{},[1])(1)}); diff --git a/package.json b/package.json index 54660bd..4fff151 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "osm-auth", - "version": "1.1.1", + "version": "1.1.2", "license": "ISC", "repository": "github:osmlab/osm-auth", "description": "A usable example of JavaScript OAuth with OpenStreetMap",