@material-ui/x-license
Version:
Material-UI X License verification
2 lines (1 loc) • 2.06 kB
JavaScript
const r=[];let t=0;for(;t<64;)r[t]=0|4294967296*Math.sin(++t%Math.PI);function e(e){const o=[];let n,a,h,c=unescape(encodeURI(e))+"",C=c.length;const f=[n=1732584193,a=4023233417,~n,~a];for(e=--C/4+2|15,o[--e]=8*C;~C;)o[C>>2]|=c.charCodeAt(C)<<8*C--;for(t=c=0;t<e;t+=16){for(C=f;c<64;C=[h=C[3],n+((h=C[0]+[n&a|~n&h,h&n|~h&a,n^a^h,a^(n|~h)][C=c>>4]+r[c]+~~o[t|15&[c,5*c+1,3*c+5,7*c][C]])<<(C=[7,12,17,22,5,9,14,20,4,11,16,23,6,10,15,21][4*C+c++%4])|h>>>-C),n,a])n=0|C[1],a=C[2];for(c=4;c;)f[--c]+=C[c]}for(e="";c<32;)e+=(f[c>>3]>>4*(1^c++)&15).toString(16);return e}const o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";const n=r=>{let t,e,n,a,h,c,C,f="",d=0;for(r=r.replace(/[^A-Za-z0-9\+\/\=]/g,"");d<r.length;)a=o.indexOf(r.charAt(d++)),h=o.indexOf(r.charAt(d++)),c=o.indexOf(r.charAt(d++)),C=o.indexOf(r.charAt(d++)),t=a<<2|h>>4,e=(15&h)<<4|c>>2,n=(3&c)<<6|C,f+=String.fromCharCode(t),64!=c&&(f+=String.fromCharCode(e)),64!=C&&(f+=String.fromCharCode(n));return f=function(r){let t,e,o,n="",a=0;for(t=e=o=0;a<r.length;)t=r.charCodeAt(a),t<128?(n+=String.fromCharCode(t),a++):t>191&&t<224?(e=r.charCodeAt(a+1),n+=String.fromCharCode((31&t)<<6|63&e),a+=2):(e=r.charCodeAt(a+1),o=r.charCodeAt(a+2),n+=String.fromCharCode((15&t)<<12|(63&e)<<6|63&o),a+=3);return n}(f),f},a=r=>{let t,e,n,a,h,c,C,f="",d=0;for(r=function(r){r=r.replace(/\r\n/g,"\n");let t="";for(let e=0;e<r.length;e++){const o=r.charCodeAt(e);o<128?t+=String.fromCharCode(o):o>127&&o<2048?(t+=String.fromCharCode(o>>6|192),t+=String.fromCharCode(63&o|128)):(t+=String.fromCharCode(o>>12|224),t+=String.fromCharCode(o>>6&63|128),t+=String.fromCharCode(63&o|128))}return t}(r);d<r.length;)t=r.charCodeAt(d++),e=r.charCodeAt(d++),n=r.charCodeAt(d++),a=t>>2,h=(3&t)<<4|e>>4,c=(15&e)<<2|n>>6,C=63&n,isNaN(e)?c=C=64:isNaN(n)&&(C=64),f=f+o.charAt(a)+o.charAt(h)+o.charAt(c)+o.charAt(C);return f};function h(r){const t=function(r){return`ORDER:${r.orderNumber},EXPIRY=${r.expiryDate.getTime()},KEYVERSION=1`}(r);return`${e(a(t))}${a(t)}`}export{n as a,a as b,h as g,e as m};