mirror of
https://github.com/CorentinTh/it-tools.git
synced 2025-05-05 13:57:10 -04:00
15 lines
55 KiB
JavaScript
15 lines
55 KiB
JavaScript
![]() |
import{e as F}from"./chunk-a740628f.js";import{c as ce}from"./chunk-302442b1.js";import{r as ve}from"./chunk-44692048.js";var Qr={exports:{}},y0={exports:{}},hr;function I(){return hr||(hr=1,function(q,T){(function(l,a){q.exports=a()})(F,function(){var l=l||function(a,B){var _;if(typeof window<"u"&&window.crypto&&(_=window.crypto),typeof self<"u"&&self.crypto&&(_=self.crypto),typeof globalThis<"u"&&globalThis.crypto&&(_=globalThis.crypto),!_&&typeof window<"u"&&window.msCrypto&&(_=window.msCrypto),!_&&typeof F<"u"&&F.crypto&&(_=F.crypto),!_&&typeof ce=="function")try{_=ve}catch{}var R=function(){if(_){if(typeof _.getRandomValues=="function")try{return _.getRandomValues(new Uint32Array(1))[0]}catch{}if(typeof _.randomBytes=="function")try{return _.randomBytes(4).readInt32LE()}catch{}}throw new Error("Native crypto module could not be used to get secure random number.")},d=Object.create||function(){function x(){}return function(i){var s;return x.prototype=i,s=new x,x.prototype=null,s}}(),h={},r=h.lib={},t=r.Base=function(){return{extend:function(x){var i=d(this);return x&&i.mixIn(x),(!i.hasOwnProperty("init")||this.init===i.init)&&(i.init=function(){i.$super.init.apply(this,arguments)}),i.init.prototype=i,i.$super=this,i},create:function(){var x=this.extend();return x.init.apply(x,arguments),x},init:function(){},mixIn:function(x){for(var i in x)x.hasOwnProperty(i)&&(this[i]=x[i]);x.hasOwnProperty("toString")&&(this.toString=x.toString)},clone:function(){return this.init.prototype.extend(this)}}}(),u=r.WordArray=t.extend({init:function(x,i){x=this.words=x||[],i!=B?this.sigBytes=i:this.sigBytes=x.length*4},toString:function(x){return(x||o).stringify(this)},concat:function(x){var i=this.words,s=x.words,g=this.sigBytes,y=x.sigBytes;if(this.clamp(),g%4)for(var C=0;C<y;C++){var k=s[C>>>2]>>>24-C%4*8&255;i[g+C>>>2]|=k<<24-(g+C)%4*8}else for(var E=0;E<y;E+=4)i[g+E>>>2]=s[E>>>2];return this.sigBytes+=y,this},clamp:function(){var x=this.words,i=this.sigBytes;x[i>>>2]&=4294967295<<32-i%4*8,x.length=a.ceil(i/4)},clone:function(){var x=t.clone.call(this);return x.words=this.words.slice(0),x},random:function(x){for(var i=[],s=0;s<x;s+=4)i.push(R());return new u.init(i,x)}}),e=h.enc={},o=e.Hex={stringify:function(x){for(var i=x.words,s=x.sigBytes,g=[],y=0;y<s;y++){var C=i[y>>>2]>>>24-y%4*8&255;g.push((C>>>4).toString(16)),g.push((C&15).toString(16))}return g.join("")},parse:function(x){for(var i=x.length,s=[],g=0;g<i;g+=2)s[g>>>3]|=parseInt(x.substr(g,2),16)<<24-g%8*4;return new u.init(s,i/2)}},n=e.Latin1={stringify:function(x){for(var i=x.words,s=x.sigBytes,g=[],y=0;y<s;y++){var C=i[y>>>2]>>>24-y%4*8&255;g.push(String.fromCharCode(C))}return g.join("")},parse:function(x){for(var i=x.length,s=[],g=0;g<i;g++)s[g>>>2]|=(x.charCodeAt(g)&255)<<24-g%4*8;return new u.init(s,i)}},f=e.Utf8={stringify:function(x){try{return decodeURIComponent(escape(n.stringify(x)))}catch{throw new Error("Malformed UTF-8 data")}},parse:function(x){return n.parse(unescape(encodeURIComponent(x)))}},c=r.BufferedBlockAlgorithm=t.extend({reset:function(){this._data=new u.init,this._nDataBytes=0},_append:function(x){typeof x=="string"&&(x=f.parse(x)),this._data.concat(x),this._nDataBytes+=x.sigBytes},_process:function(x){var i,s=this._data,g=s.words,y=s.sigBytes,C=this.blockSize,k=C*4,E=y/k;x?E=a.ceil(E):E=a.max((E|0)-this._minBufferSize,0);var v=E*C,p=a.min(v*4,y);if(v){for(var w=0;w<v;w+=C)this._doProcessBlock(g,w);i=g.splice(0,v),s.sigBytes-=p}return new u.init(i,p)},clone:function(){var x=t.clone.call(this);return x._data=this._data.clone(),x},_minBufferSize:0});r.Hasher=c.extend({cfg:t.extend(),init:function(x){this.cfg=this.cfg.extend(x),this.reset()},reset:function(){c.reset.call(this),this._doReset()},update:function(x){return this._append(x),this._process(),this},finalize:function(x){x&&this._append(x);var i=this._doFinalize();return i},blockSize:16,_createHelper:function(x){return function(i,s){return new x.init(s).finalize(i)}},_createHmacHelper:function(x){return function(i,s){return new b.HMAC.init(x,s).finalize(i)}}});var b=h.algo={};return h}(Math);retu
|
||
|
(c) 2012 by Cédric Mesnil. All rights reserved.
|
||
|
|
||
|
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
|
||
|
|
||
|
- Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
|
||
|
- Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
|
||
|
|
||
|
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||
|
*/return function(a){var B=l,_=B.lib,R=_.WordArray,d=_.Hasher,h=B.algo,r=R.create([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]),t=R.create([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]),u=R.create([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]),e=R.create([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]),o=R.create([0,1518500249,1859775393,2400959708,2840853838]),n=R.create([1352829926,1548603684,1836072691,2053994217,0]),f=h.RIPEMD160=d.extend({_doReset:function(){this._hash=R.create([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(y,C){for(var k=0;k<16;k++){var E=C+k,v=y[E];y[E]=(v<<8|v>>>24)&16711935|(v<<24|v>>>8)&4278255360}var p=this._hash.words,w=o.words,A=n.words,D=r.words,P=t.words,L=u.words,O=e.words,K,U,N,H,S,z,m,G,X,$;z=K=p[0],m=U=p[1],G=N=p[2],X=H=p[3],$=S=p[4];for(var W,k=0;k<80;k+=1)W=K+y[C+D[k]]|0,k<16?W+=c(U,N,H)+w[0]:k<32?W+=b(U,N,H)+w[1]:k<48?W+=x(U,N,H)+w[2]:k<64?W+=i(U,N,H)+w[3]:W+=s(U,N,H)+w[4],W=W|0,W=g(W,L[k]),W=W+S|0,K=S,S=H,H=g(N,10),N=U,U=W,W=z+y[C+P[k]]|0,k<16?W+=s(m,G,X)+A[0]:k<32?W+=i(m,G,X)+A[1]:k<48?W+=x(m,G,X)+A[2]:k<64?W+=b(m,G,X)+A[3]:W+=c(m,G,X)+A[4],W=W|0,W=g(W,O[k]),W=W+$|0,z=$,$=X,X=g(G,10),G=m,m=W;W=p[1]+N+X|0,p[1]=p[2]+H+$|0,p[2]=p[3]+S+z|0,p[3]=p[4]+K+m|0,p[4]=p[0]+U+G|0,p[0]=W},_doFinalize:function(){var y=this._data,C=y.words,k=this._nDataBytes*8,E=y.sigBytes*8;C[E>>>5]|=128<<24-E%32,C[(E+64>>>9<<4)+14]=(k<<8|k>>>24)&16711935|(k<<24|k>>>8)&4278255360,y.sigBytes=(C.length+1)*4,this._process();for(var v=this._hash,p=v.words,w=0;w<5;w++){var A=p[w];p[w]=(A<<8|A>>>24)&16711935|(A<<24|A>>>8)&4278255360}return v},clone:function(){var y=d.clone.call(this);return y._hash=this._hash.clone(),y}});function c(y,C,k){return y^C^k}function b(y,C,k){return y&C|~y&k}function x(y,C,k){return(y|~C)^k}function i(y,C,k){return y&k|C&~k}function s(y,C,k){return y^(C|~k)}function g(y,C){return y<<C|y>>>32-C}B.RIPEMD160=d._createHelper(f),B.HmacRIPEMD160=d._createHmacHelper(f)}(),l.RIPEMD160})}(D0)),D0.exports}var P0={exports:{}},Sr;function er(){return Sr||(Sr=1,function(q,T){(function(l,a){q.exports=a(I())})(F,function(l){(function(){var a=l,B=a.lib,_=B.Base,R=a.enc,d=R.Utf8,h=a.algo;h.HMAC=_.extend({init:function(r,t){r=this._hasher=new r.init,typeof t=="string"&&(t=d.parse(t));var u=r.blockSize,e=u*4;t.sigBytes>e&&(t=r.finalize(t)),t.clamp();for(var o=this._oKey=t.clone(),n=this._iKey=t.clone(),f=o.words,c=n.words,b=0;b<u;b++)f[b]^=1549556828,c[b]^=909522486;o.sigBytes=n.sigBytes=e,this.reset()},reset:function(){var r=this._hasher;r.reset(),r.update(this._iKey)},update:function(r){return this._hasher.update(r),this},finalize:function(r){var t=this._hasher,u=t.finalize(r);t.reset();var e=t.finalize(this._oKey.clone().concat(u));return e}})})()})}(P0)),P0.exports}var W0={exports:{}},Rr;function ge(){return Rr||(Rr=1,function(q,T){(function(l,a,B){q.exports=a(I(),rr(),er())})(F,function(l){return function(){var a=l,B=a.lib,_=B.Base,R=B.WordArray,d=a.algo,h=d.SHA1,r=d.HMAC,t=d.PBKDF2=_.extend({cfg:_.extend({keySize:128/32,hasher:h,iterations:1}),init:function(u){this.cfg=this.cfg.extend(u)},compute:function(u,e){for(var o=this.cfg,n=r.create(o.hasher,u),f=R.create(),c=R.create([1]),b=f.words,x=c.words,i=o.keySize,s=o.iterations;b.length<i;){var g=n.update(e).finalize(c);n.reset();for(var y=g.words,C=y.length,k=g,E=1;E<s;E++){k=n.finalize(k),n.reset();for(var v=k.words,p=0;p<C;p++)y[p]^=v[p]}f.concat(g),x[0]++}return f.sigBytes=i*4,f}});a.PBKDF2=function(u,e,o){return t.creat
|
||
|
* Counter block mode compatible with Dr Brian Gladman fileenc.c
|
||
|
* derived from CryptoJS.mode.CTR
|
||
|
* Jan Hruby jhruby.web@gmail.com
|
||
|
*/return l.mode.CTRGladman=function(){var a=l.lib.BlockCipherMode.extend();function B(d){if((d>>24&255)===255){var h=d>>16&255,r=d>>8&255,t=d&255;h===255?(h=0,r===255?(r=0,t===255?t=0:++t):++r):++h,d=0,d+=h<<16,d+=r<<8,d+=t}else d+=1<<24;return d}function _(d){return(d[0]=B(d[0]))===0&&(d[1]=B(d[1])),d}var R=a.Encryptor=a.extend({processBlock:function(d,h){var r=this._cipher,t=r.blockSize,u=this._iv,e=this._counter;u&&(e=this._counter=u.slice(0),this._iv=void 0),_(e);var o=e.slice(0);r.encryptBlock(o,0);for(var n=0;n<t;n++)d[h+n]^=o[n]}});return a.Decryptor=R,a}(),l.mode.CTRGladman})}(K0)),K0.exports}var N0={exports:{}},Wr;function ke(){return Wr||(Wr=1,function(q,T){(function(l,a,B){q.exports=a(I(),Z())})(F,function(l){return l.mode.OFB=function(){var a=l.lib.BlockCipherMode.extend(),B=a.Encryptor=a.extend({processBlock:function(_,R){var d=this._cipher,h=d.blockSize,r=this._iv,t=this._keystream;r&&(t=this._keystream=r.slice(0),this._iv=void 0),d.encryptBlock(t,0);for(var u=0;u<h;u++)_[R+u]^=t[u]}});return a.Decryptor=B,a}(),l.mode.OFB})}(N0)),N0.exports}var U0={exports:{}},Fr;function He(){return Fr||(Fr=1,function(q,T){(function(l,a,B){q.exports=a(I(),Z())})(F,function(l){return l.mode.ECB=function(){var a=l.lib.BlockCipherMode.extend();return a.Encryptor=a.extend({processBlock:function(B,_){this._cipher.encryptBlock(B,_)}}),a.Decryptor=a.extend({processBlock:function(B,_){this._cipher.decryptBlock(B,_)}}),a}(),l.mode.ECB})}(U0)),U0.exports}var X0={exports:{}},Lr;function we(){return Lr||(Lr=1,function(q,T){(function(l,a,B){q.exports=a(I(),Z())})(F,function(l){return l.pad.AnsiX923={pad:function(a,B){var _=a.sigBytes,R=B*4,d=R-_%R,h=_+d-1;a.clamp(),a.words[h>>>2]|=d<<24-h%4*8,a.sigBytes+=d},unpad:function(a){var B=a.words[a.sigBytes-1>>>2]&255;a.sigBytes-=B}},l.pad.Ansix923})}(X0)),X0.exports}var O0={exports:{}},Tr;function me(){return Tr||(Tr=1,function(q,T){(function(l,a,B){q.exports=a(I(),Z())})(F,function(l){return l.pad.Iso10126={pad:function(a,B){var _=B*4,R=_-a.sigBytes%_;a.concat(l.lib.WordArray.random(R-1)).concat(l.lib.WordArray.create([R<<24],1))},unpad:function(a){var B=a.words[a.sigBytes-1>>>2]&255;a.sigBytes-=B}},l.pad.Iso10126})}(O0)),O0.exports}var G0={exports:{}},Ir;function Ae(){return Ir||(Ir=1,function(q,T){(function(l,a,B){q.exports=a(I(),Z())})(F,function(l){return l.pad.Iso97971={pad:function(a,B){a.concat(l.lib.WordArray.create([2147483648],1)),l.pad.ZeroPadding.pad(a,B)},unpad:function(a){l.pad.ZeroPadding.unpad(a),a.sigBytes--}},l.pad.Iso97971})}(G0)),G0.exports}var Z0={exports:{}},Kr;function Se(){return Kr||(Kr=1,function(q,T){(function(l,a,B){q.exports=a(I(),Z())})(F,function(l){return l.pad.ZeroPadding={pad:function(a,B){var _=B*4;a.clamp(),a.sigBytes+=_-(a.sigBytes%_||_)},unpad:function(a){for(var B=a.words,_=a.sigBytes-1,_=a.sigBytes-1;_>=0;_--)if(B[_>>>2]>>>24-_%4*8&255){a.sigBytes=_+1;break}}},l.pad.ZeroPadding})}(Z0)),Z0.exports}var $0={exports:{}},Nr;function Re(){return Nr||(Nr=1,function(q,T){(function(l,a,B){q.exports=a(I(),Z())})(F,function(l){return l.pad.NoPadding={pad:function(){},unpad:function(){}},l.pad.NoPadding})}($0)),$0.exports}var Q0={exports:{}},Ur;function ze(){return Ur||(Ur=1,function(q,T){(function(l,a,B){q.exports=a(I(),Z())})(F,function(l){return function(a){var B=l,_=B.lib,R=_.CipherParams,d=B.enc,h=d.Hex,r=B.format;r.Hex={stringify:function(t){return t.ciphertext.toString(h)},parse:function(t){var u=h.parse(t);return R.create({ciphertext:u})}}}(),l.format.Hex})}(Q0)),Q0.exports}var Y0={exports:{}},Xr;function Ee(){return Xr||(Xr=1,function(q,T){(function(l,a,B){q.exports=a(I(),n0(),o0(),e0(),Z())})(F,function(l){return function(){var a=l,B=a.lib,_=B.BlockCipher,R=a.algo,d=[],h=[],r=[],t=[],u=[],e=[],o=[],n=[],f=[],c=[];(function(){for(var i=[],s=0;s<256;s++)s<128?i[s]=s<<1:i[s]=s<<1^283;for(var g=0,y=0,s=0;s<256;s++){var C=y^y<<1^y<<2^y<<3^y<<4;C=C>>>8^C&255^99,d[g]=C,h[C]=g;var k=i[g],E=i[k],v=i[E],p=i[C]*257^C*16843008;r[g]=p<<24|p>>>8,t[g]=p<<16|p>>>16,u[g]=p<<8|p>>>24,e[g]=p;var p=v*16843009^E*65537^k*257^g*16843008;o[C]=p<<24|p>>>8,n[C]=p<<16|p>>>16,f[C
|