diff --git a/dash.js b/dash.js
index 96d68a6..5037b43 100644
--- a/dash.js
+++ b/dash.js
@@ -5,13 +5,27 @@ import * as speck32_64ecb from './speck32_64ecb.js';
const textarea = document.getElementById('textarea');
const encoderDropdown = document.getElementById('encoder');
const cipherDropdown = document.getElementById('cipher');
+const signBtn = document.getElementById('sign');
+const sigDetect = document.getElementById('sigDetect');
+
+const SIG = {
+ 3: '\u{200D}\u{200B}\u{00AD}\u{180E}',
+ 6: '\u{200D}\u{200B}\u{00AD}\u{2060}',
+ 8: '\u{200D}\u{200B}\u{00AD}\u{FEFF}'
+};
+
document.getElementById('encodeButton').addEventListener('click', ACT);
document.getElementById('decodeButton').addEventListener('click', ACT);
-document.getElementById('sign').addEventListener('click', e =>
+signBtn.addEventListener('click', e =>
e.target.classList.toggle('on')
);
+let fadeTimer;
+
function ACT(event) {
+ clearTimeout(fadeTimer);
+ sigDetect.className = '';
+
if (textarea.value === '') {
textarea.value = 'The text box is empty.';
return;
@@ -19,14 +33,35 @@ function ACT(event) {
const op = event.target.id === 'encodeButton' ? 'NO' : 'YES';
const cipher = getCipherKey();
- const base = encoderDropdown.value.split('-')[1];
+ let base = encoderDropdown.value.split('-')[1];
+ let text = textarea.value;
+
+ if (op === 'YES') {
+ const sigBase = Object.keys(SIG).find(b => text.includes(SIG[b]));
+ if (sigBase) {
+ if (sigBase !== base) {
+ sigDetect.textContent = `ZWUS-${sigBase} signature detected`;
+ sigDetect.className = 'show';
+ fadeTimer = setTimeout(() =>
+ sigDetect.className = '', 2000
+ );
+ }
+ base = sigBase;
+ encoderDropdown.value = 'ZWUS-' + base;
+ text = text.replace(SIG[base], '');
+ }
+ }
+
const needsKey = cipher !== 'PLAIN';
const kStr = needsKey && prompt('enter password.');
if (needsKey && !kStr) return;
try {
- textarea.value = DESCRY[op][cipher](textarea.value, base, kStr);
+ let val = DESCRY[op][cipher](text, base, kStr);
+ if (op === 'NO' && signBtn.classList.contains('on'))
+ val = SIG[base] + val;
+ textarea.value = val;
} catch (e) {
console.log(e);
}
diff --git a/dist/chrome/index.css b/dist/chrome/index.css
index b12abdd..9804f44 100644
--- a/dist/chrome/index.css
+++ b/dist/chrome/index.css
@@ -1 +1 @@
-@font-face{font-family:Open Sans;font-style:normal;font-weight:400;font-display:swap;src:url(/open-sans-v44-latin-regular.woff2) format("woff2")}html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,big,cite,code,del,dfn,em,img,ins,kbd,q,s,samp,small,strike,strong,sub,sup,tt,var,b,u,i,center,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td,article,aside,canvas,details,embed,figure,figcaption,footer,header,hgroup,menu,nav,output,ruby,section,summary,time,mark,audio,video{margin:0;padding:0;border:0;font-size:100%;font:inherit;vertical-align:baseline}article,aside,details,figcaption,figure,footer,header,hgroup,menu,nav,section{display:block}body{font-family:Open Sans,sans-serif;background-color:#002b4d;width:500px;height:320px;line-height:1;border:1.5px solid rgb(0,126,199)}#overbar{padding:1.5%;font-size:10px;font-weight:700;margin-bottom:0;color:#e5f4ff99;border-bottom:1px solid rgb(0,126,199,.5)}#homepage{position:fixed;text-decoration:none;color:#ff0;right:2.5%}#textarea{background-color:#e6e6e6;margin:1.5%;width:95.5%;height:69%;font-family:Open Sans,sans-serif;font-size:13px;font-style:normal;font-variant:normal;font-weight:400;line-height:20px}input{font-size:11.5px}#encodeButton{display:inline-block;margin-bottom:0;margin-left:1.5%;color:#002b4d;cursor:pointer}#decodeButton{margin-bottom:0;margin-left:1.5%;color:#002b4d;cursor:pointer}select{display:inline-block;margin-bottom:0;margin-left:1.5%;color:#002b4d;background-color:#e6e6e6;text-align:center;font-size:11px;width:8em;vertical-align:middle}#encodeButton,#decodeButton{vertical-align:middle}#sign{margin-left:1.5%;font-size:11px;padding:1px 8px;border-radius:99px;border:1px solid rgba(229,244,255,.2);background:transparent;color:#e5f4ff59;cursor:pointer;vertical-align:middle}#sign:hover{border-color:#e5f4ff59;color:#e5f4ff80}#sign.on{background:#e6e6e6;border-color:#e6e6e6;color:#002b4d}#sign.on:hover{background:#fff;border-color:#fff}#notice{font-size:10px;margin-top:1.5%;padding:.8% 0% 0% 1.7%;color:#e5f4ff99;border-top:1px solid rgb(0,126,199,.5)}#versions{color:#007ec7;text-decoration:none}
+@font-face{font-family:Open Sans;font-style:normal;font-weight:400;font-display:swap;src:url(/open-sans-v44-latin-regular.woff2) format("woff2")}html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,big,cite,code,del,dfn,em,img,ins,kbd,q,s,samp,small,strike,strong,sub,sup,tt,var,b,u,i,center,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td,article,aside,canvas,details,embed,figure,figcaption,footer,header,hgroup,menu,nav,output,ruby,section,summary,time,mark,audio,video{margin:0;padding:0;border:0;font-size:100%;font:inherit;vertical-align:baseline}article,aside,details,figcaption,figure,footer,header,hgroup,menu,nav,section{display:block}body{font-family:Open Sans,sans-serif;background-color:#002b4d;width:500px;height:320px;line-height:1;border:1.5px solid rgb(0,126,199)}#overbar{position:relative;padding:1.5%;font-size:10px;font-weight:700;margin-bottom:0;color:#e5f4ff99;border-bottom:1px solid rgb(0,126,199,.5)}#sigDetect{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);font-weight:400;color:#e5f4ffd9;opacity:0;transition:opacity 1s}#sigDetect.show{opacity:1;transition:opacity .2s}#homepage{position:fixed;text-decoration:none;color:#ff0;right:2.5%}#textarea{background-color:#e6e6e6;margin:1.5%;width:95.5%;height:69%;font-family:Open Sans,sans-serif;font-size:13px;font-style:normal;font-variant:normal;font-weight:400;line-height:20px}input{font-size:11.5px}#encodeButton{display:inline-block;margin-bottom:0;margin-left:1.5%;color:#002b4d;cursor:pointer}#decodeButton{margin-bottom:0;margin-left:1.5%;color:#002b4d;cursor:pointer}select{display:inline-block;margin-bottom:0;margin-left:1.5%;color:#002b4d;background-color:#e6e6e6;text-align:center;font-size:11px;width:8em;vertical-align:middle}#encodeButton,#decodeButton{vertical-align:middle}#sign{margin-left:1.5%;font-size:11px;padding:1px 8px;border-radius:99px;border:1px solid rgba(229,244,255,.2);background:transparent;color:#e5f4ff59;cursor:pointer;vertical-align:middle}#sign:hover{border-color:#e5f4ff59;color:#e5f4ff80}#sign.on{background:#e6e6e6;border-color:#e6e6e6;color:#002b4d}#sign.on:hover{background:#fff;border-color:#fff}#notice{font-size:10px;margin-top:1.5%;padding:.8% 0% 0% 1.7%;color:#e5f4ff99;border-top:1px solid rgb(0,126,199,.5)}#versions{color:#007ec7;text-decoration:none}
diff --git a/dist/chrome/index.html b/dist/chrome/index.html
index c6b35e9..de81b4b 100644
--- a/dist/chrome/index.html
+++ b/dist/chrome/index.html
@@ -7,7 +7,7 @@
-
+
diff --git a/dist/chrome/index.js b/dist/chrome/index.js
index bc49bd8..001cd0b 100644
--- a/dist/chrome/index.js
+++ b/dist/chrome/index.js
@@ -1,4 +1,4 @@
-(function(){const r=document.createElement("link").relList;if(r&&r.supports&&r.supports("modulepreload"))return;for(const d of document.querySelectorAll('link[rel="modulepreload"]'))h(d);new MutationObserver(d=>{for(const b of d)if(b.type==="childList")for(const c of b.addedNodes)c.tagName==="LINK"&&c.rel==="modulepreload"&&h(c)}).observe(document,{childList:!0,subtree:!0});function f(d){const b={};return d.integrity&&(b.integrity=d.integrity),d.referrerPolicy&&(b.referrerPolicy=d.referrerPolicy),d.crossOrigin==="use-credentials"?b.credentials="include":d.crossOrigin==="anonymous"?b.credentials="omit":b.credentials="same-origin",b}function h(d){if(d.ep)return;d.ep=!0;const b=f(d);fetch(d.href,b)}})();const w={3:{unifier:"",0:"",1:"",2:""},6:{unifier:"",0:"",1:"",2:"",3:"",4:"",5:""},8:{unifier:"",0:"",1:"",2:"",3:"",4:"",5:"",6:"",7:"\uFEFF"},encodeString:(i,r=3)=>Array.from(i,f=>f.codePointAt(0).toString(r).split("").map(h=>w[r][h]).join("")).join(w[r].unifier),encodeNumberArray:(i,r=3)=>i.map(f=>f.toString(r).split("").map(h=>w[r][h]).join("")).join(w[r].unifier),decodeToString:(i,r=3)=>i.split(w[r].unifier).map(f=>String.fromCodePoint(parseInt(Array.from(f).map(h=>Object.keys(w[r]).find(d=>w[r][d]===h)).join(""),r))).join(""),decodeToNumberArray:(i,r=3)=>i.split(w[r].unifier).map(f=>parseInt(Array.from(f).map(h=>Object.keys(w[r]).find(d=>w[r][d]===h)).join(""),r))};function X(i){return i&&i.__esModule&&Object.prototype.hasOwnProperty.call(i,"default")?i.default:i}var F,_;function J(){if(_)return F;_=1;function i(r={}){const f=r.bits||16,h=r.rounds||22,d=r.rightRotations||7,b=r.leftRotations||2,c=2**f,s=c-1,a=(o,t)=>o>>t|o<o<>f-t,k=(o,t,e)=>(o=a(o,d),o=o+t&s,o^=e,t=y(t,b),t^=o,[o,t]),A=(o,t,e)=>(t^=o,t=a(t,b),o^=e,o=o-t&s,o=y(o,d),[o,t]);function I(o,t){let e=o[0],l=o[1],n=t[0],p=t.slice(1);[l,e]=k(l,e,n);for(let g=0;g{const l=o([t/c|0,t&s],e);return l[0]*c+l[1]}}return{encrypt:u(I),decrypt:u(E),encryptRaw:I,decryptRaw:E}}return F=i,F}var Q=J();const x=X(Q);var R,j;function L(){if(j)return R;j=1;const i="Input must be an string, Buffer or Uint8Array";function r(c){let s;if(c instanceof Uint8Array)s=c;else if(typeof c=="string")s=new TextEncoder().encode(c);else throw new Error(i);return s}function f(c){return Array.prototype.map.call(c,function(s){return(s<16?"0":"")+s.toString(16)}).join("")}function h(c){return(4294967296+c).toString(16).substring(1)}function d(c,s,a){let y=`
-`+c+" = ";for(let k=0;k=4294967296&&g++,e[l]=p,e[l+1]=g}function f(e,l,n,p){let g=e[l]+n;n<0&&(g+=4294967296);let m=e[l+1]+p;g>=4294967296&&m++,e[l]=g,e[l+1]=m}function h(e,l){return e[l]^e[l+1]<<8^e[l+2]<<16^e[l+3]<<24}function d(e,l,n,p,g,m){const z=y[g],V=y[g+1],Y=y[m],$=y[m+1];r(a,e,l),f(a,e,z,V);let U=a[p]^a[e],B=a[p+1]^a[e+1];a[p]=B,a[p+1]=U,r(a,n,p),U=a[l]^a[n],B=a[l+1]^a[n+1],a[l]=U>>>24^B<<8,a[l+1]=B>>>24^U<<8,r(a,e,l),f(a,e,Y,$),U=a[p]^a[e],B=a[p+1]^a[e+1],a[p]=U>>>16^B<<16,a[p+1]=B>>>16^U<<16,r(a,n,p),U=a[l]^a[n],B=a[l+1]^a[n+1],a[l]=B>>>31^U<<1,a[l+1]=U>>>31^B<<1}const b=new Uint32Array([4089235720,1779033703,2227873595,3144134277,4271175723,1013904242,1595750129,2773480762,2917565137,1359893119,725511199,2600822924,4215389547,528734635,327033209,1541459225]),c=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,14,10,4,8,9,15,13,6,1,12,0,2,11,7,5,3,11,8,12,0,5,2,15,13,10,14,3,6,7,1,9,4,7,9,3,1,13,12,11,14,2,6,5,10,4,0,15,8,9,0,5,7,2,4,10,15,14,1,11,12,6,8,3,13,2,12,6,10,0,11,8,3,4,13,7,5,15,14,1,9,12,5,1,15,14,13,4,10,0,7,6,3,9,2,8,11,13,11,7,14,12,1,3,9,5,0,15,4,8,6,2,10,6,15,14,9,11,3,0,8,12,2,13,7,1,4,10,5,10,2,8,4,7,6,1,5,15,11,9,14,3,12,13,0,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,14,10,4,8,9,15,13,6,1,12,0,2,11,7,5,3],s=new Uint8Array(c.map(function(e){return e*2})),a=new Uint32Array(32),y=new Uint32Array(32);function k(e,l){let n=0;for(n=0;n<16;n++)a[n]=e.h[n],a[n+16]=b[n];for(a[24]=a[24]^e.t,a[25]=a[25]^e.t/4294967296,l&&(a[28]=~a[28],a[29]=~a[29]),n=0;n<32;n++)y[n]=h(e.b,4*n);for(n=0;n<12;n++)d(0,8,16,24,s[n*16+0],s[n*16+1]),d(2,10,18,26,s[n*16+2],s[n*16+3]),d(4,12,20,28,s[n*16+4],s[n*16+5]),d(6,14,22,30,s[n*16+6],s[n*16+7]),d(0,10,20,30,s[n*16+8],s[n*16+9]),d(2,12,22,24,s[n*16+10],s[n*16+11]),d(4,14,16,26,s[n*16+12],s[n*16+13]),d(6,8,18,28,s[n*16+14],s[n*16+15]);for(n=0;n<16;n++)e.h[n]=e.h[n]^a[n]^a[n+16]}const A=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]);function I(e,l,n,p){if(e===0||e>64)throw new Error("Illegal output length, expected 0 < length <= 64");if(l&&l.length>64)throw new Error("Illegal key, expected Uint8Array with 0 < length <= 64");if(n&&n.length!==16)throw new Error("Illegal salt, expected Uint8Array with length is 16");if(p&&p.length!==16)throw new Error("Illegal personal, expected Uint8Array with length is 16");const g={b:new Uint8Array(128),h:new Uint32Array(16),t:0,c:0,outlen:e};A.fill(0),A[0]=e,l&&(A[1]=l.length),A[2]=1,A[3]=1,n&&A.set(n,32),p&&A.set(p,48);for(let m=0;m<16;m++)g.h[m]=b[m]^h(A,m*4);return l&&(E(g,l),g.c=128),g}function E(e,l){for(let n=0;n>2]>>8*(n&3);return l}function o(e,l,n,p,g){n=n||64,e=i.normalizeInput(e),p&&(p=i.normalizeInput(p)),g&&(g=i.normalizeInput(g));const m=I(n,l,p,g);return E(m,e),u(m)}function t(e,l,n,p,g){const m=o(e,l,n,p,g);return i.toHex(m)}return T={blake2b:o,blake2bHex:t,blake2bInit:I,blake2bUpdate:E,blake2bFinal:u},T}var C,D;function Z(){if(D)return C;D=1;const i=L();function r(u,o){return u[o]^u[o+1]<<8^u[o+2]<<16^u[o+3]<<24}function f(u,o,t,e,l,n){c[u]=c[u]+c[o]+l,c[e]=h(c[e]^c[u],16),c[t]=c[t]+c[e],c[o]=h(c[o]^c[t],12),c[u]=c[u]+c[o]+n,c[e]=h(c[e]^c[u],8),c[t]=c[t]+c[e],c[o]=h(c[o]^c[t],7)}function h(u,o){return u>>>o^u<<32-o}const d=new Uint32Array([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),b=new Uint8Array([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,14,10,4,8,9,15,13,6,1,12,0,2,11,7,5,3,11,8,12,0,5,2,15,13,10,14,3,6,7,1,9,4,7,9,3,1,13,12,11,14,2,6,5,10,4,0,15,8,9,0,5,7,2,4,10,15,14,1,11,12,6,8,3,13,2,12,6,10,0,11,8,3,4,13,7,5,15,14,1,9,12,5,1,15,14,13,4,10,0,7,6,3,9,2,8,11,13,11,7,14,12,1,3,9,5,0,15,4,8,6,2,10,6,15,14,9,11,3,0,8,12,2,13,7,1,4,10,5,10,2,8,4,7,6,1,5,15,11,9,14,3,12,13,0]),c=new Uint32Array(16),s=new Uint32Array(16);function a(u,o){let t=0;for(t=0;t<8;t++)c[t]=u.h[t],c[t+8]=d[t];for(c[12]^=u.t,c[13]^=u.t/4294967296,o&&(c[14]=~c[14]),t=0;t<16;t++)s[t]=r(u.b,4*t);for(t=0;t<10;t++)f(0,4,8,12,s[b[t*16+0]],s[b[t*16+1]]),f(1,5,9,13,s[b[t*16+2]],s[b[t*16+3]]),f(2,6,10,14,s[b[t*16+4]],s[b[t*16+5]]),f(3,7,11,15,s[b[t*16+6]],s[b[t*16+7]]),f(0,5,10,15,s[b[t*16+8]],s[b[t*16+9]]),f(1,6,11,12,s[b[t*16+10]],s[b[t*16+11]]),f(2,7,8,13,s[b[t*16+12]],s[b[t*16+13]]),f(3,4,9,14,s[b[t*16+14]],s[b[t*16+15]]);for(t=0;t<8;t++)u.h[t]^=c[t]^c[t+8]}function y(u,o){if(!(u>0&&u<=32))throw new Error("Incorrect output length, should be in [1, 32]");const t=o?o.length:0;if(o&&!(t>0&&t<=32))throw new Error("Incorrect key length, should be in [1, 32]");const e={h:new Uint32Array(d),b:new Uint8Array(64),c:0,t:0,outlen:u};return e.h[0]^=16842752^t<<8^u,t>0&&(k(e,o),e.c=64),e}function k(u,o){for(let t=0;t>2]>>8*(t&3)&255;return o}function I(u,o,t){t=t||32,u=i.normalizeInput(u);const e=y(t,o);return k(e,u),A(e)}function E(u,o,t){const e=I(u,o,t);return i.toHex(e)}return C={blake2s:I,blake2sHex:E,blake2sInit:y,blake2sUpdate:k,blake2sFinal:A},C}var O,H;function ee(){if(H)return O;H=1;const i=W(),r=Z();return O={blake2b:i.blake2b,blake2bHex:i.blake2bHex,blake2bInit:i.blake2bInit,blake2bUpdate:i.blake2bUpdate,blake2bFinal:i.blake2bFinal,blake2s:r.blake2s,blake2sHex:r.blake2sHex,blake2sInit:r.blake2sInit,blake2sUpdate:r.blake2sUpdate,blake2sFinal:r.blake2sFinal},O}var M=ee();const q=x({bits:24,rounds:23,rightRotations:8,leftRotations:3});function N(i){const r=M.blake2bHex(i,null,12);return[parseInt(r.slice(0,6),16),parseInt(r.slice(6,12),16),parseInt(r.slice(12,18),16),parseInt(r.slice(18,24),16)]}function te(i,r){const f=globalThis.crypto.getRandomValues(new Uint32Array(1))[0]&16777215,h=Array.from(i,(d,b)=>{const c=f*16777216+(b&16777215),s=q.encrypt(c,r);return(d.codePointAt(0)^s)>>>0});return[f,...h]}function ne(i,r){if(!i||i.length===0)return"";const f=i[0];return i.slice(1).map((d,b)=>{const c=f*16777216+(b&16777215),s=q.encrypt(c,r),a=(d^s)>>>0;try{return String.fromCodePoint(a)}catch{return""}}).join("")}const G=x();function v(i){const r=M.blake2bHex(i,null,8);return[parseInt(r.slice(0,4),16),parseInt(r.slice(4,8),16),parseInt(r.slice(8,12),16),parseInt(r.slice(12,16),16)]}function re(i,r){return Array.from(i,f=>G.encrypt(f.codePointAt(0),r))}function oe(i,r){return i.map(f=>{try{return String.fromCodePoint(G.decrypt(f,r))}catch{return""}}).join("")}const S=document.getElementById("textarea"),ie=document.getElementById("encoder"),ce=document.getElementById("cipher");document.getElementById("encodeButton").addEventListener("click",K);document.getElementById("decodeButton").addEventListener("click",K);document.getElementById("sign").addEventListener("click",i=>i.target.classList.toggle("on"));function K(i){if(S.value===""){S.value="The text box is empty.";return}const r=i.target.id==="encodeButton"?"NO":"YES",f=se(),h=ie.value.split("-")[1],d=f!=="PLAIN",b=d&&prompt("enter password.");if(!(d&&!b)){try{S.value=le[r][f](S.value,h,b)}catch(c){console.log(c)}r==="NO"&&(S.select(),document.execCommand("copy"),S.value=`Copied to your clipboard.
- A copy has been placed between these brackets [`+S.value+"]")}}function se(){return ce.value}const le={NO:{PLAIN:(i,r)=>w.encodeString(i,r),SPECK48_96CTR:(i,r,f)=>w.encodeNumberArray(te(i,N(f)),r),"SPECK32_64ECB (insecure)":(i,r,f)=>w.encodeNumberArray(re(i,v(f)),r)},YES:{PLAIN:(i,r)=>w.decodeToString(i,r),SPECK48_96CTR:(i,r,f)=>ne(w.decodeToNumberArray(i,r),N(f)),"SPECK32_64ECB (insecure)":(i,r,f)=>oe(w.decodeToNumberArray(i,r),v(f))}};
+(function(){const r=document.createElement("link").relList;if(r&&r.supports&&r.supports("modulepreload"))return;for(const d of document.querySelectorAll('link[rel="modulepreload"]'))p(d);new MutationObserver(d=>{for(const b of d)if(b.type==="childList")for(const s of b.addedNodes)s.tagName==="LINK"&&s.rel==="modulepreload"&&p(s)}).observe(document,{childList:!0,subtree:!0});function f(d){const b={};return d.integrity&&(b.integrity=d.integrity),d.referrerPolicy&&(b.referrerPolicy=d.referrerPolicy),d.crossOrigin==="use-credentials"?b.credentials="include":d.crossOrigin==="anonymous"?b.credentials="omit":b.credentials="same-origin",b}function p(d){if(d.ep)return;d.ep=!0;const b=f(d);fetch(d.href,b)}})();const w={3:{unifier:"",0:"",1:"",2:""},6:{unifier:"",0:"",1:"",2:"",3:"",4:"",5:""},8:{unifier:"",0:"",1:"",2:"",3:"",4:"",5:"",6:"",7:"\uFEFF"},encodeString:(c,r=3)=>Array.from(c,f=>f.codePointAt(0).toString(r).split("").map(p=>w[r][p]).join("")).join(w[r].unifier),encodeNumberArray:(c,r=3)=>c.map(f=>f.toString(r).split("").map(p=>w[r][p]).join("")).join(w[r].unifier),decodeToString:(c,r=3)=>c.split(w[r].unifier).map(f=>String.fromCodePoint(parseInt(Array.from(f).map(p=>Object.keys(w[r]).find(d=>w[r][d]===p)).join(""),r))).join(""),decodeToNumberArray:(c,r=3)=>c.split(w[r].unifier).map(f=>parseInt(Array.from(f).map(p=>Object.keys(w[r]).find(d=>w[r][d]===p)).join(""),r))};function ee(c){return c&&c.__esModule&&Object.prototype.hasOwnProperty.call(c,"default")?c.default:c}var T,_;function te(){if(_)return T;_=1;function c(r={}){const f=r.bits||16,p=r.rounds||22,d=r.rightRotations||7,b=r.leftRotations||2,s=2**f,o=s-1,l=(i,t)=>i>>t|i<i<>f-t,k=(i,t,e)=>(i=l(i,d),i=i+t&o,i^=e,t=m(t,b),t^=i,[i,t]),A=(i,t,e)=>(t^=i,t=l(t,b),i^=e,i=i-t&o,i=m(i,d),[i,t]);function I(i,t){let e=i[0],u=i[1],n=t[0],g=t.slice(1);[u,e]=k(u,e,n);for(let h=0;h{const u=i([t/s|0,t&o],e);return u[0]*s+u[1]}}return{encrypt:a(I),decrypt:a(E),encryptRaw:I,decryptRaw:E}}return T=c,T}var ne=te();const G=ee(ne);var C,N;function K(){if(N)return C;N=1;const c="Input must be an string, Buffer or Uint8Array";function r(s){let o;if(s instanceof Uint8Array)o=s;else if(typeof s=="string")o=new TextEncoder().encode(s);else throw new Error(c);return o}function f(s){return Array.prototype.map.call(s,function(o){return(o<16?"0":"")+o.toString(16)}).join("")}function p(s){return(4294967296+s).toString(16).substring(1)}function d(s,o,l){let m=`
+`+s+" = ";for(let k=0;k=4294967296&&h++,e[u]=g,e[u+1]=h}function f(e,u,n,g){let h=e[u]+n;n<0&&(h+=4294967296);let y=e[u+1]+g;h>=4294967296&&y++,e[u]=h,e[u+1]=y}function p(e,u){return e[u]^e[u+1]<<8^e[u+2]<<16^e[u+3]<<24}function d(e,u,n,g,h,y){const Z=m[h],X=m[h+1],J=m[y],Q=m[y+1];r(l,e,u),f(l,e,Z,X);let B=l[g]^l[e],S=l[g+1]^l[e+1];l[g]=S,l[g+1]=B,r(l,n,g),B=l[u]^l[n],S=l[u+1]^l[n+1],l[u]=B>>>24^S<<8,l[u+1]=S>>>24^B<<8,r(l,e,u),f(l,e,J,Q),B=l[g]^l[e],S=l[g+1]^l[e+1],l[g]=B>>>16^S<<16,l[g+1]=S>>>16^B<<16,r(l,n,g),B=l[u]^l[n],S=l[u+1]^l[n+1],l[u]=S>>>31^B<<1,l[u+1]=B>>>31^S<<1}const b=new Uint32Array([4089235720,1779033703,2227873595,3144134277,4271175723,1013904242,1595750129,2773480762,2917565137,1359893119,725511199,2600822924,4215389547,528734635,327033209,1541459225]),s=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,14,10,4,8,9,15,13,6,1,12,0,2,11,7,5,3,11,8,12,0,5,2,15,13,10,14,3,6,7,1,9,4,7,9,3,1,13,12,11,14,2,6,5,10,4,0,15,8,9,0,5,7,2,4,10,15,14,1,11,12,6,8,3,13,2,12,6,10,0,11,8,3,4,13,7,5,15,14,1,9,12,5,1,15,14,13,4,10,0,7,6,3,9,2,8,11,13,11,7,14,12,1,3,9,5,0,15,4,8,6,2,10,6,15,14,9,11,3,0,8,12,2,13,7,1,4,10,5,10,2,8,4,7,6,1,5,15,11,9,14,3,12,13,0,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,14,10,4,8,9,15,13,6,1,12,0,2,11,7,5,3],o=new Uint8Array(s.map(function(e){return e*2})),l=new Uint32Array(32),m=new Uint32Array(32);function k(e,u){let n=0;for(n=0;n<16;n++)l[n]=e.h[n],l[n+16]=b[n];for(l[24]=l[24]^e.t,l[25]=l[25]^e.t/4294967296,u&&(l[28]=~l[28],l[29]=~l[29]),n=0;n<32;n++)m[n]=p(e.b,4*n);for(n=0;n<12;n++)d(0,8,16,24,o[n*16+0],o[n*16+1]),d(2,10,18,26,o[n*16+2],o[n*16+3]),d(4,12,20,28,o[n*16+4],o[n*16+5]),d(6,14,22,30,o[n*16+6],o[n*16+7]),d(0,10,20,30,o[n*16+8],o[n*16+9]),d(2,12,22,24,o[n*16+10],o[n*16+11]),d(4,14,16,26,o[n*16+12],o[n*16+13]),d(6,8,18,28,o[n*16+14],o[n*16+15]);for(n=0;n<16;n++)e.h[n]=e.h[n]^l[n]^l[n+16]}const A=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]);function I(e,u,n,g){if(e===0||e>64)throw new Error("Illegal output length, expected 0 < length <= 64");if(u&&u.length>64)throw new Error("Illegal key, expected Uint8Array with 0 < length <= 64");if(n&&n.length!==16)throw new Error("Illegal salt, expected Uint8Array with length is 16");if(g&&g.length!==16)throw new Error("Illegal personal, expected Uint8Array with length is 16");const h={b:new Uint8Array(128),h:new Uint32Array(16),t:0,c:0,outlen:e};A.fill(0),A[0]=e,u&&(A[1]=u.length),A[2]=1,A[3]=1,n&&A.set(n,32),g&&A.set(g,48);for(let y=0;y<16;y++)h.h[y]=b[y]^p(A,y*4);return u&&(E(h,u),h.c=128),h}function E(e,u){for(let n=0;n>2]>>8*(n&3);return u}function i(e,u,n,g,h){n=n||64,e=c.normalizeInput(e),g&&(g=c.normalizeInput(g)),h&&(h=c.normalizeInput(h));const y=I(n,u,g,h);return E(y,e),a(y)}function t(e,u,n,g,h){const y=i(e,u,n,g,h);return c.toHex(y)}return D={blake2b:i,blake2bHex:t,blake2bInit:I,blake2bUpdate:E,blake2bFinal:a},D}var O,v;function oe(){if(v)return O;v=1;const c=K();function r(a,i){return a[i]^a[i+1]<<8^a[i+2]<<16^a[i+3]<<24}function f(a,i,t,e,u,n){s[a]=s[a]+s[i]+u,s[e]=p(s[e]^s[a],16),s[t]=s[t]+s[e],s[i]=p(s[i]^s[t],12),s[a]=s[a]+s[i]+n,s[e]=p(s[e]^s[a],8),s[t]=s[t]+s[e],s[i]=p(s[i]^s[t],7)}function p(a,i){return a>>>i^a<<32-i}const d=new Uint32Array([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),b=new Uint8Array([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,14,10,4,8,9,15,13,6,1,12,0,2,11,7,5,3,11,8,12,0,5,2,15,13,10,14,3,6,7,1,9,4,7,9,3,1,13,12,11,14,2,6,5,10,4,0,15,8,9,0,5,7,2,4,10,15,14,1,11,12,6,8,3,13,2,12,6,10,0,11,8,3,4,13,7,5,15,14,1,9,12,5,1,15,14,13,4,10,0,7,6,3,9,2,8,11,13,11,7,14,12,1,3,9,5,0,15,4,8,6,2,10,6,15,14,9,11,3,0,8,12,2,13,7,1,4,10,5,10,2,8,4,7,6,1,5,15,11,9,14,3,12,13,0]),s=new Uint32Array(16),o=new Uint32Array(16);function l(a,i){let t=0;for(t=0;t<8;t++)s[t]=a.h[t],s[t+8]=d[t];for(s[12]^=a.t,s[13]^=a.t/4294967296,i&&(s[14]=~s[14]),t=0;t<16;t++)o[t]=r(a.b,4*t);for(t=0;t<10;t++)f(0,4,8,12,o[b[t*16+0]],o[b[t*16+1]]),f(1,5,9,13,o[b[t*16+2]],o[b[t*16+3]]),f(2,6,10,14,o[b[t*16+4]],o[b[t*16+5]]),f(3,7,11,15,o[b[t*16+6]],o[b[t*16+7]]),f(0,5,10,15,o[b[t*16+8]],o[b[t*16+9]]),f(1,6,11,12,o[b[t*16+10]],o[b[t*16+11]]),f(2,7,8,13,o[b[t*16+12]],o[b[t*16+13]]),f(3,4,9,14,o[b[t*16+14]],o[b[t*16+15]]);for(t=0;t<8;t++)a.h[t]^=s[t]^s[t+8]}function m(a,i){if(!(a>0&&a<=32))throw new Error("Incorrect output length, should be in [1, 32]");const t=i?i.length:0;if(i&&!(t>0&&t<=32))throw new Error("Incorrect key length, should be in [1, 32]");const e={h:new Uint32Array(d),b:new Uint8Array(64),c:0,t:0,outlen:a};return e.h[0]^=16842752^t<<8^a,t>0&&(k(e,i),e.c=64),e}function k(a,i){for(let t=0;t>2]>>8*(t&3)&255;return i}function I(a,i,t){t=t||32,a=c.normalizeInput(a);const e=m(t,i);return k(e,a),A(e)}function E(a,i,t){const e=I(a,i,t);return c.toHex(e)}return O={blake2s:I,blake2sHex:E,blake2sInit:m,blake2sUpdate:k,blake2sFinal:A},O}var j,x;function ie(){if(x)return j;x=1;const c=re(),r=oe();return j={blake2b:c.blake2b,blake2bHex:c.blake2bHex,blake2bInit:c.blake2bInit,blake2bUpdate:c.blake2bUpdate,blake2bFinal:c.blake2bFinal,blake2s:r.blake2s,blake2sHex:r.blake2sHex,blake2sInit:r.blake2sInit,blake2sUpdate:r.blake2sUpdate,blake2sFinal:r.blake2sFinal},j}var z=ie();const Y=G({bits:24,rounds:23,rightRotations:8,leftRotations:3});function H(c){const r=z.blake2bHex(c,null,12);return[parseInt(r.slice(0,6),16),parseInt(r.slice(6,12),16),parseInt(r.slice(12,18),16),parseInt(r.slice(18,24),16)]}function ce(c,r){const f=globalThis.crypto.getRandomValues(new Uint32Array(1))[0]&16777215,p=Array.from(c,(d,b)=>{const s=f*16777216+(b&16777215),o=Y.encrypt(s,r);return(d.codePointAt(0)^o)>>>0});return[f,...p]}function se(c,r){if(!c||c.length===0)return"";const f=c[0];return c.slice(1).map((d,b)=>{const s=f*16777216+(b&16777215),o=Y.encrypt(s,r),l=(d^o)>>>0;try{return String.fromCodePoint(l)}catch{return""}}).join("")}const $=G();function L(c){const r=z.blake2bHex(c,null,8);return[parseInt(r.slice(0,4),16),parseInt(r.slice(4,8),16),parseInt(r.slice(8,12),16),parseInt(r.slice(12,16),16)]}function le(c,r){return Array.from(c,f=>$.encrypt(f.codePointAt(0),r))}function ue(c,r){return c.map(f=>{try{return String.fromCodePoint($.decrypt(f,r))}catch{return""}}).join("")}const U=document.getElementById("textarea"),M=document.getElementById("encoder"),ae=document.getElementById("cipher"),V=document.getElementById("sign"),F=document.getElementById("sigDetect"),R={3:"",6:"",8:"\uFEFF"};document.getElementById("encodeButton").addEventListener("click",W);document.getElementById("decodeButton").addEventListener("click",W);V.addEventListener("click",c=>c.target.classList.toggle("on"));let q;function W(c){if(clearTimeout(q),F.className="",U.value===""){U.value="The text box is empty.";return}const r=c.target.id==="encodeButton"?"NO":"YES",f=fe();let p=M.value.split("-")[1],d=U.value;if(r==="YES"){const o=Object.keys(R).find(l=>d.includes(R[l]));o&&(o!==p&&(F.textContent=`ZWUS-${o} signature detected`,F.className="show",q=setTimeout(()=>F.className="",2e3)),p=o,M.value="ZWUS-"+p,d=d.replace(R[p],""))}const b=f!=="PLAIN",s=b&&prompt("enter password.");if(!(b&&!s)){try{let o=de[r][f](d,p,s);r==="NO"&&V.classList.contains("on")&&(o=R[p]+o),U.value=o}catch(o){console.log(o)}r==="NO"&&(U.select(),document.execCommand("copy"),U.value=`Copied to your clipboard.
+ A copy has been placed between these brackets [`+U.value+"]")}}function fe(){return ae.value}const de={NO:{PLAIN:(c,r)=>w.encodeString(c,r),SPECK48_96CTR:(c,r,f)=>w.encodeNumberArray(ce(c,H(f)),r),"SPECK32_64ECB (insecure)":(c,r,f)=>w.encodeNumberArray(le(c,L(f)),r)},YES:{PLAIN:(c,r)=>w.decodeToString(c,r),SPECK48_96CTR:(c,r,f)=>se(w.decodeToNumberArray(c,r),H(f)),"SPECK32_64ECB (insecure)":(c,r,f)=>ue(w.decodeToNumberArray(c,r),L(f))}};
diff --git a/dist/firefox/index.css b/dist/firefox/index.css
index b12abdd..7eadd47 100644
--- a/dist/firefox/index.css
+++ b/dist/firefox/index.css
@@ -1 +1 @@
-@font-face{font-family:Open Sans;font-style:normal;font-weight:400;font-display:swap;src:url(/open-sans-v44-latin-regular.woff2) format("woff2")}html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,big,cite,code,del,dfn,em,img,ins,kbd,q,s,samp,small,strike,strong,sub,sup,tt,var,b,u,i,center,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td,article,aside,canvas,details,embed,figure,figcaption,footer,header,hgroup,menu,nav,output,ruby,section,summary,time,mark,audio,video{margin:0;padding:0;border:0;font-size:100%;font:inherit;vertical-align:baseline}article,aside,details,figcaption,figure,footer,header,hgroup,menu,nav,section{display:block}body{font-family:Open Sans,sans-serif;background-color:#002b4d;width:500px;height:320px;line-height:1;border:1.5px solid rgb(0,126,199)}#overbar{padding:1.5%;font-size:10px;font-weight:700;margin-bottom:0;color:#e5f4ff99;border-bottom:1px solid rgb(0,126,199,.5)}#homepage{position:fixed;text-decoration:none;color:#ff0;right:2.5%}#textarea{background-color:#e6e6e6;margin:1.5%;width:95.5%;height:69%;font-family:Open Sans,sans-serif;font-size:13px;font-style:normal;font-variant:normal;font-weight:400;line-height:20px}input{font-size:11.5px}#encodeButton{display:inline-block;margin-bottom:0;margin-left:1.5%;color:#002b4d;cursor:pointer}#decodeButton{margin-bottom:0;margin-left:1.5%;color:#002b4d;cursor:pointer}select{display:inline-block;margin-bottom:0;margin-left:1.5%;color:#002b4d;background-color:#e6e6e6;text-align:center;font-size:11px;width:8em;vertical-align:middle}#encodeButton,#decodeButton{vertical-align:middle}#sign{margin-left:1.5%;font-size:11px;padding:1px 8px;border-radius:99px;border:1px solid rgba(229,244,255,.2);background:transparent;color:#e5f4ff59;cursor:pointer;vertical-align:middle}#sign:hover{border-color:#e5f4ff59;color:#e5f4ff80}#sign.on{background:#e6e6e6;border-color:#e6e6e6;color:#002b4d}#sign.on:hover{background:#fff;border-color:#fff}#notice{font-size:10px;margin-top:1.5%;padding:.8% 0% 0% 1.7%;color:#e5f4ff99;border-top:1px solid rgb(0,126,199,.5)}#versions{color:#007ec7;text-decoration:none}
+@font-face{font-family:Open Sans;font-style:normal;font-weight:400;font-display:swap;src:url(/open-sans-v44-latin-regular.woff2) format("woff2")}html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,big,cite,code,del,dfn,em,img,ins,kbd,q,s,samp,small,strike,strong,sub,sup,tt,var,b,u,i,center,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td,article,aside,canvas,details,embed,figure,figcaption,footer,header,hgroup,menu,nav,output,ruby,section,summary,time,mark,audio,video{margin:0;padding:0;border:0;font-size:100%;font:inherit;vertical-align:baseline}article,aside,details,figcaption,figure,footer,header,hgroup,menu,nav,section{display:block}body{font-family:Open Sans,sans-serif;background-color:#002b4d;width:500px;height:320px;line-height:1;border:1.5px solid rgb(0,126,199)}#overbar{position:relative;padding:1.5%;font-size:10px;font-weight:700;margin-bottom:0;color:#e5f4ff99;border-bottom:1px solid rgb(0,126,199,.5)}#sigDetect{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);font-weight:400;color:#e5f4ffd9;opacity:0;transition:opacity 1s}#sigDetect.show{opacity:1;transition:none}#homepage{position:fixed;text-decoration:none;color:#ff0;right:2.5%}#textarea{background-color:#e6e6e6;margin:1.5%;width:95.5%;height:69%;font-family:Open Sans,sans-serif;font-size:13px;font-style:normal;font-variant:normal;font-weight:400;line-height:20px}input{font-size:11.5px}#encodeButton{display:inline-block;margin-bottom:0;margin-left:1.5%;color:#002b4d;cursor:pointer}#decodeButton{margin-bottom:0;margin-left:1.5%;color:#002b4d;cursor:pointer}select{display:inline-block;margin-bottom:0;margin-left:1.5%;color:#002b4d;background-color:#e6e6e6;text-align:center;font-size:11px;width:8em;vertical-align:middle}#encodeButton,#decodeButton{vertical-align:middle}#sign{margin-left:1.5%;font-size:11px;padding:1px 8px;border-radius:99px;border:1px solid rgba(229,244,255,.2);background:transparent;color:#e5f4ff59;cursor:pointer;vertical-align:middle}#sign:hover{border-color:#e5f4ff59;color:#e5f4ff80}#sign.on{background:#e6e6e6;border-color:#e6e6e6;color:#002b4d}#sign.on:hover{background:#fff;border-color:#fff}#notice{font-size:10px;margin-top:1.5%;padding:.8% 0% 0% 1.7%;color:#e5f4ff99;border-top:1px solid rgb(0,126,199,.5)}#versions{color:#007ec7;text-decoration:none}
diff --git a/dist/firefox/index.html b/dist/firefox/index.html
index c6b35e9..de81b4b 100644
--- a/dist/firefox/index.html
+++ b/dist/firefox/index.html
@@ -7,7 +7,7 @@
-
+
diff --git a/dist/firefox/index.js b/dist/firefox/index.js
index bc49bd8..001cd0b 100644
--- a/dist/firefox/index.js
+++ b/dist/firefox/index.js
@@ -1,4 +1,4 @@
-(function(){const r=document.createElement("link").relList;if(r&&r.supports&&r.supports("modulepreload"))return;for(const d of document.querySelectorAll('link[rel="modulepreload"]'))h(d);new MutationObserver(d=>{for(const b of d)if(b.type==="childList")for(const c of b.addedNodes)c.tagName==="LINK"&&c.rel==="modulepreload"&&h(c)}).observe(document,{childList:!0,subtree:!0});function f(d){const b={};return d.integrity&&(b.integrity=d.integrity),d.referrerPolicy&&(b.referrerPolicy=d.referrerPolicy),d.crossOrigin==="use-credentials"?b.credentials="include":d.crossOrigin==="anonymous"?b.credentials="omit":b.credentials="same-origin",b}function h(d){if(d.ep)return;d.ep=!0;const b=f(d);fetch(d.href,b)}})();const w={3:{unifier:"",0:"",1:"",2:""},6:{unifier:"",0:"",1:"",2:"",3:"",4:"",5:""},8:{unifier:"",0:"",1:"",2:"",3:"",4:"",5:"",6:"",7:"\uFEFF"},encodeString:(i,r=3)=>Array.from(i,f=>f.codePointAt(0).toString(r).split("").map(h=>w[r][h]).join("")).join(w[r].unifier),encodeNumberArray:(i,r=3)=>i.map(f=>f.toString(r).split("").map(h=>w[r][h]).join("")).join(w[r].unifier),decodeToString:(i,r=3)=>i.split(w[r].unifier).map(f=>String.fromCodePoint(parseInt(Array.from(f).map(h=>Object.keys(w[r]).find(d=>w[r][d]===h)).join(""),r))).join(""),decodeToNumberArray:(i,r=3)=>i.split(w[r].unifier).map(f=>parseInt(Array.from(f).map(h=>Object.keys(w[r]).find(d=>w[r][d]===h)).join(""),r))};function X(i){return i&&i.__esModule&&Object.prototype.hasOwnProperty.call(i,"default")?i.default:i}var F,_;function J(){if(_)return F;_=1;function i(r={}){const f=r.bits||16,h=r.rounds||22,d=r.rightRotations||7,b=r.leftRotations||2,c=2**f,s=c-1,a=(o,t)=>o>>t|o<o<>f-t,k=(o,t,e)=>(o=a(o,d),o=o+t&s,o^=e,t=y(t,b),t^=o,[o,t]),A=(o,t,e)=>(t^=o,t=a(t,b),o^=e,o=o-t&s,o=y(o,d),[o,t]);function I(o,t){let e=o[0],l=o[1],n=t[0],p=t.slice(1);[l,e]=k(l,e,n);for(let g=0;g{const l=o([t/c|0,t&s],e);return l[0]*c+l[1]}}return{encrypt:u(I),decrypt:u(E),encryptRaw:I,decryptRaw:E}}return F=i,F}var Q=J();const x=X(Q);var R,j;function L(){if(j)return R;j=1;const i="Input must be an string, Buffer or Uint8Array";function r(c){let s;if(c instanceof Uint8Array)s=c;else if(typeof c=="string")s=new TextEncoder().encode(c);else throw new Error(i);return s}function f(c){return Array.prototype.map.call(c,function(s){return(s<16?"0":"")+s.toString(16)}).join("")}function h(c){return(4294967296+c).toString(16).substring(1)}function d(c,s,a){let y=`
-`+c+" = ";for(let k=0;k=4294967296&&g++,e[l]=p,e[l+1]=g}function f(e,l,n,p){let g=e[l]+n;n<0&&(g+=4294967296);let m=e[l+1]+p;g>=4294967296&&m++,e[l]=g,e[l+1]=m}function h(e,l){return e[l]^e[l+1]<<8^e[l+2]<<16^e[l+3]<<24}function d(e,l,n,p,g,m){const z=y[g],V=y[g+1],Y=y[m],$=y[m+1];r(a,e,l),f(a,e,z,V);let U=a[p]^a[e],B=a[p+1]^a[e+1];a[p]=B,a[p+1]=U,r(a,n,p),U=a[l]^a[n],B=a[l+1]^a[n+1],a[l]=U>>>24^B<<8,a[l+1]=B>>>24^U<<8,r(a,e,l),f(a,e,Y,$),U=a[p]^a[e],B=a[p+1]^a[e+1],a[p]=U>>>16^B<<16,a[p+1]=B>>>16^U<<16,r(a,n,p),U=a[l]^a[n],B=a[l+1]^a[n+1],a[l]=B>>>31^U<<1,a[l+1]=U>>>31^B<<1}const b=new Uint32Array([4089235720,1779033703,2227873595,3144134277,4271175723,1013904242,1595750129,2773480762,2917565137,1359893119,725511199,2600822924,4215389547,528734635,327033209,1541459225]),c=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,14,10,4,8,9,15,13,6,1,12,0,2,11,7,5,3,11,8,12,0,5,2,15,13,10,14,3,6,7,1,9,4,7,9,3,1,13,12,11,14,2,6,5,10,4,0,15,8,9,0,5,7,2,4,10,15,14,1,11,12,6,8,3,13,2,12,6,10,0,11,8,3,4,13,7,5,15,14,1,9,12,5,1,15,14,13,4,10,0,7,6,3,9,2,8,11,13,11,7,14,12,1,3,9,5,0,15,4,8,6,2,10,6,15,14,9,11,3,0,8,12,2,13,7,1,4,10,5,10,2,8,4,7,6,1,5,15,11,9,14,3,12,13,0,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,14,10,4,8,9,15,13,6,1,12,0,2,11,7,5,3],s=new Uint8Array(c.map(function(e){return e*2})),a=new Uint32Array(32),y=new Uint32Array(32);function k(e,l){let n=0;for(n=0;n<16;n++)a[n]=e.h[n],a[n+16]=b[n];for(a[24]=a[24]^e.t,a[25]=a[25]^e.t/4294967296,l&&(a[28]=~a[28],a[29]=~a[29]),n=0;n<32;n++)y[n]=h(e.b,4*n);for(n=0;n<12;n++)d(0,8,16,24,s[n*16+0],s[n*16+1]),d(2,10,18,26,s[n*16+2],s[n*16+3]),d(4,12,20,28,s[n*16+4],s[n*16+5]),d(6,14,22,30,s[n*16+6],s[n*16+7]),d(0,10,20,30,s[n*16+8],s[n*16+9]),d(2,12,22,24,s[n*16+10],s[n*16+11]),d(4,14,16,26,s[n*16+12],s[n*16+13]),d(6,8,18,28,s[n*16+14],s[n*16+15]);for(n=0;n<16;n++)e.h[n]=e.h[n]^a[n]^a[n+16]}const A=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]);function I(e,l,n,p){if(e===0||e>64)throw new Error("Illegal output length, expected 0 < length <= 64");if(l&&l.length>64)throw new Error("Illegal key, expected Uint8Array with 0 < length <= 64");if(n&&n.length!==16)throw new Error("Illegal salt, expected Uint8Array with length is 16");if(p&&p.length!==16)throw new Error("Illegal personal, expected Uint8Array with length is 16");const g={b:new Uint8Array(128),h:new Uint32Array(16),t:0,c:0,outlen:e};A.fill(0),A[0]=e,l&&(A[1]=l.length),A[2]=1,A[3]=1,n&&A.set(n,32),p&&A.set(p,48);for(let m=0;m<16;m++)g.h[m]=b[m]^h(A,m*4);return l&&(E(g,l),g.c=128),g}function E(e,l){for(let n=0;n>2]>>8*(n&3);return l}function o(e,l,n,p,g){n=n||64,e=i.normalizeInput(e),p&&(p=i.normalizeInput(p)),g&&(g=i.normalizeInput(g));const m=I(n,l,p,g);return E(m,e),u(m)}function t(e,l,n,p,g){const m=o(e,l,n,p,g);return i.toHex(m)}return T={blake2b:o,blake2bHex:t,blake2bInit:I,blake2bUpdate:E,blake2bFinal:u},T}var C,D;function Z(){if(D)return C;D=1;const i=L();function r(u,o){return u[o]^u[o+1]<<8^u[o+2]<<16^u[o+3]<<24}function f(u,o,t,e,l,n){c[u]=c[u]+c[o]+l,c[e]=h(c[e]^c[u],16),c[t]=c[t]+c[e],c[o]=h(c[o]^c[t],12),c[u]=c[u]+c[o]+n,c[e]=h(c[e]^c[u],8),c[t]=c[t]+c[e],c[o]=h(c[o]^c[t],7)}function h(u,o){return u>>>o^u<<32-o}const d=new Uint32Array([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),b=new Uint8Array([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,14,10,4,8,9,15,13,6,1,12,0,2,11,7,5,3,11,8,12,0,5,2,15,13,10,14,3,6,7,1,9,4,7,9,3,1,13,12,11,14,2,6,5,10,4,0,15,8,9,0,5,7,2,4,10,15,14,1,11,12,6,8,3,13,2,12,6,10,0,11,8,3,4,13,7,5,15,14,1,9,12,5,1,15,14,13,4,10,0,7,6,3,9,2,8,11,13,11,7,14,12,1,3,9,5,0,15,4,8,6,2,10,6,15,14,9,11,3,0,8,12,2,13,7,1,4,10,5,10,2,8,4,7,6,1,5,15,11,9,14,3,12,13,0]),c=new Uint32Array(16),s=new Uint32Array(16);function a(u,o){let t=0;for(t=0;t<8;t++)c[t]=u.h[t],c[t+8]=d[t];for(c[12]^=u.t,c[13]^=u.t/4294967296,o&&(c[14]=~c[14]),t=0;t<16;t++)s[t]=r(u.b,4*t);for(t=0;t<10;t++)f(0,4,8,12,s[b[t*16+0]],s[b[t*16+1]]),f(1,5,9,13,s[b[t*16+2]],s[b[t*16+3]]),f(2,6,10,14,s[b[t*16+4]],s[b[t*16+5]]),f(3,7,11,15,s[b[t*16+6]],s[b[t*16+7]]),f(0,5,10,15,s[b[t*16+8]],s[b[t*16+9]]),f(1,6,11,12,s[b[t*16+10]],s[b[t*16+11]]),f(2,7,8,13,s[b[t*16+12]],s[b[t*16+13]]),f(3,4,9,14,s[b[t*16+14]],s[b[t*16+15]]);for(t=0;t<8;t++)u.h[t]^=c[t]^c[t+8]}function y(u,o){if(!(u>0&&u<=32))throw new Error("Incorrect output length, should be in [1, 32]");const t=o?o.length:0;if(o&&!(t>0&&t<=32))throw new Error("Incorrect key length, should be in [1, 32]");const e={h:new Uint32Array(d),b:new Uint8Array(64),c:0,t:0,outlen:u};return e.h[0]^=16842752^t<<8^u,t>0&&(k(e,o),e.c=64),e}function k(u,o){for(let t=0;t>2]>>8*(t&3)&255;return o}function I(u,o,t){t=t||32,u=i.normalizeInput(u);const e=y(t,o);return k(e,u),A(e)}function E(u,o,t){const e=I(u,o,t);return i.toHex(e)}return C={blake2s:I,blake2sHex:E,blake2sInit:y,blake2sUpdate:k,blake2sFinal:A},C}var O,H;function ee(){if(H)return O;H=1;const i=W(),r=Z();return O={blake2b:i.blake2b,blake2bHex:i.blake2bHex,blake2bInit:i.blake2bInit,blake2bUpdate:i.blake2bUpdate,blake2bFinal:i.blake2bFinal,blake2s:r.blake2s,blake2sHex:r.blake2sHex,blake2sInit:r.blake2sInit,blake2sUpdate:r.blake2sUpdate,blake2sFinal:r.blake2sFinal},O}var M=ee();const q=x({bits:24,rounds:23,rightRotations:8,leftRotations:3});function N(i){const r=M.blake2bHex(i,null,12);return[parseInt(r.slice(0,6),16),parseInt(r.slice(6,12),16),parseInt(r.slice(12,18),16),parseInt(r.slice(18,24),16)]}function te(i,r){const f=globalThis.crypto.getRandomValues(new Uint32Array(1))[0]&16777215,h=Array.from(i,(d,b)=>{const c=f*16777216+(b&16777215),s=q.encrypt(c,r);return(d.codePointAt(0)^s)>>>0});return[f,...h]}function ne(i,r){if(!i||i.length===0)return"";const f=i[0];return i.slice(1).map((d,b)=>{const c=f*16777216+(b&16777215),s=q.encrypt(c,r),a=(d^s)>>>0;try{return String.fromCodePoint(a)}catch{return""}}).join("")}const G=x();function v(i){const r=M.blake2bHex(i,null,8);return[parseInt(r.slice(0,4),16),parseInt(r.slice(4,8),16),parseInt(r.slice(8,12),16),parseInt(r.slice(12,16),16)]}function re(i,r){return Array.from(i,f=>G.encrypt(f.codePointAt(0),r))}function oe(i,r){return i.map(f=>{try{return String.fromCodePoint(G.decrypt(f,r))}catch{return""}}).join("")}const S=document.getElementById("textarea"),ie=document.getElementById("encoder"),ce=document.getElementById("cipher");document.getElementById("encodeButton").addEventListener("click",K);document.getElementById("decodeButton").addEventListener("click",K);document.getElementById("sign").addEventListener("click",i=>i.target.classList.toggle("on"));function K(i){if(S.value===""){S.value="The text box is empty.";return}const r=i.target.id==="encodeButton"?"NO":"YES",f=se(),h=ie.value.split("-")[1],d=f!=="PLAIN",b=d&&prompt("enter password.");if(!(d&&!b)){try{S.value=le[r][f](S.value,h,b)}catch(c){console.log(c)}r==="NO"&&(S.select(),document.execCommand("copy"),S.value=`Copied to your clipboard.
- A copy has been placed between these brackets [`+S.value+"]")}}function se(){return ce.value}const le={NO:{PLAIN:(i,r)=>w.encodeString(i,r),SPECK48_96CTR:(i,r,f)=>w.encodeNumberArray(te(i,N(f)),r),"SPECK32_64ECB (insecure)":(i,r,f)=>w.encodeNumberArray(re(i,v(f)),r)},YES:{PLAIN:(i,r)=>w.decodeToString(i,r),SPECK48_96CTR:(i,r,f)=>ne(w.decodeToNumberArray(i,r),N(f)),"SPECK32_64ECB (insecure)":(i,r,f)=>oe(w.decodeToNumberArray(i,r),v(f))}};
+(function(){const r=document.createElement("link").relList;if(r&&r.supports&&r.supports("modulepreload"))return;for(const d of document.querySelectorAll('link[rel="modulepreload"]'))p(d);new MutationObserver(d=>{for(const b of d)if(b.type==="childList")for(const s of b.addedNodes)s.tagName==="LINK"&&s.rel==="modulepreload"&&p(s)}).observe(document,{childList:!0,subtree:!0});function f(d){const b={};return d.integrity&&(b.integrity=d.integrity),d.referrerPolicy&&(b.referrerPolicy=d.referrerPolicy),d.crossOrigin==="use-credentials"?b.credentials="include":d.crossOrigin==="anonymous"?b.credentials="omit":b.credentials="same-origin",b}function p(d){if(d.ep)return;d.ep=!0;const b=f(d);fetch(d.href,b)}})();const w={3:{unifier:"",0:"",1:"",2:""},6:{unifier:"",0:"",1:"",2:"",3:"",4:"",5:""},8:{unifier:"",0:"",1:"",2:"",3:"",4:"",5:"",6:"",7:"\uFEFF"},encodeString:(c,r=3)=>Array.from(c,f=>f.codePointAt(0).toString(r).split("").map(p=>w[r][p]).join("")).join(w[r].unifier),encodeNumberArray:(c,r=3)=>c.map(f=>f.toString(r).split("").map(p=>w[r][p]).join("")).join(w[r].unifier),decodeToString:(c,r=3)=>c.split(w[r].unifier).map(f=>String.fromCodePoint(parseInt(Array.from(f).map(p=>Object.keys(w[r]).find(d=>w[r][d]===p)).join(""),r))).join(""),decodeToNumberArray:(c,r=3)=>c.split(w[r].unifier).map(f=>parseInt(Array.from(f).map(p=>Object.keys(w[r]).find(d=>w[r][d]===p)).join(""),r))};function ee(c){return c&&c.__esModule&&Object.prototype.hasOwnProperty.call(c,"default")?c.default:c}var T,_;function te(){if(_)return T;_=1;function c(r={}){const f=r.bits||16,p=r.rounds||22,d=r.rightRotations||7,b=r.leftRotations||2,s=2**f,o=s-1,l=(i,t)=>i>>t|i<i<>f-t,k=(i,t,e)=>(i=l(i,d),i=i+t&o,i^=e,t=m(t,b),t^=i,[i,t]),A=(i,t,e)=>(t^=i,t=l(t,b),i^=e,i=i-t&o,i=m(i,d),[i,t]);function I(i,t){let e=i[0],u=i[1],n=t[0],g=t.slice(1);[u,e]=k(u,e,n);for(let h=0;h{const u=i([t/s|0,t&o],e);return u[0]*s+u[1]}}return{encrypt:a(I),decrypt:a(E),encryptRaw:I,decryptRaw:E}}return T=c,T}var ne=te();const G=ee(ne);var C,N;function K(){if(N)return C;N=1;const c="Input must be an string, Buffer or Uint8Array";function r(s){let o;if(s instanceof Uint8Array)o=s;else if(typeof s=="string")o=new TextEncoder().encode(s);else throw new Error(c);return o}function f(s){return Array.prototype.map.call(s,function(o){return(o<16?"0":"")+o.toString(16)}).join("")}function p(s){return(4294967296+s).toString(16).substring(1)}function d(s,o,l){let m=`
+`+s+" = ";for(let k=0;k=4294967296&&h++,e[u]=g,e[u+1]=h}function f(e,u,n,g){let h=e[u]+n;n<0&&(h+=4294967296);let y=e[u+1]+g;h>=4294967296&&y++,e[u]=h,e[u+1]=y}function p(e,u){return e[u]^e[u+1]<<8^e[u+2]<<16^e[u+3]<<24}function d(e,u,n,g,h,y){const Z=m[h],X=m[h+1],J=m[y],Q=m[y+1];r(l,e,u),f(l,e,Z,X);let B=l[g]^l[e],S=l[g+1]^l[e+1];l[g]=S,l[g+1]=B,r(l,n,g),B=l[u]^l[n],S=l[u+1]^l[n+1],l[u]=B>>>24^S<<8,l[u+1]=S>>>24^B<<8,r(l,e,u),f(l,e,J,Q),B=l[g]^l[e],S=l[g+1]^l[e+1],l[g]=B>>>16^S<<16,l[g+1]=S>>>16^B<<16,r(l,n,g),B=l[u]^l[n],S=l[u+1]^l[n+1],l[u]=S>>>31^B<<1,l[u+1]=B>>>31^S<<1}const b=new Uint32Array([4089235720,1779033703,2227873595,3144134277,4271175723,1013904242,1595750129,2773480762,2917565137,1359893119,725511199,2600822924,4215389547,528734635,327033209,1541459225]),s=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,14,10,4,8,9,15,13,6,1,12,0,2,11,7,5,3,11,8,12,0,5,2,15,13,10,14,3,6,7,1,9,4,7,9,3,1,13,12,11,14,2,6,5,10,4,0,15,8,9,0,5,7,2,4,10,15,14,1,11,12,6,8,3,13,2,12,6,10,0,11,8,3,4,13,7,5,15,14,1,9,12,5,1,15,14,13,4,10,0,7,6,3,9,2,8,11,13,11,7,14,12,1,3,9,5,0,15,4,8,6,2,10,6,15,14,9,11,3,0,8,12,2,13,7,1,4,10,5,10,2,8,4,7,6,1,5,15,11,9,14,3,12,13,0,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,14,10,4,8,9,15,13,6,1,12,0,2,11,7,5,3],o=new Uint8Array(s.map(function(e){return e*2})),l=new Uint32Array(32),m=new Uint32Array(32);function k(e,u){let n=0;for(n=0;n<16;n++)l[n]=e.h[n],l[n+16]=b[n];for(l[24]=l[24]^e.t,l[25]=l[25]^e.t/4294967296,u&&(l[28]=~l[28],l[29]=~l[29]),n=0;n<32;n++)m[n]=p(e.b,4*n);for(n=0;n<12;n++)d(0,8,16,24,o[n*16+0],o[n*16+1]),d(2,10,18,26,o[n*16+2],o[n*16+3]),d(4,12,20,28,o[n*16+4],o[n*16+5]),d(6,14,22,30,o[n*16+6],o[n*16+7]),d(0,10,20,30,o[n*16+8],o[n*16+9]),d(2,12,22,24,o[n*16+10],o[n*16+11]),d(4,14,16,26,o[n*16+12],o[n*16+13]),d(6,8,18,28,o[n*16+14],o[n*16+15]);for(n=0;n<16;n++)e.h[n]=e.h[n]^l[n]^l[n+16]}const A=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]);function I(e,u,n,g){if(e===0||e>64)throw new Error("Illegal output length, expected 0 < length <= 64");if(u&&u.length>64)throw new Error("Illegal key, expected Uint8Array with 0 < length <= 64");if(n&&n.length!==16)throw new Error("Illegal salt, expected Uint8Array with length is 16");if(g&&g.length!==16)throw new Error("Illegal personal, expected Uint8Array with length is 16");const h={b:new Uint8Array(128),h:new Uint32Array(16),t:0,c:0,outlen:e};A.fill(0),A[0]=e,u&&(A[1]=u.length),A[2]=1,A[3]=1,n&&A.set(n,32),g&&A.set(g,48);for(let y=0;y<16;y++)h.h[y]=b[y]^p(A,y*4);return u&&(E(h,u),h.c=128),h}function E(e,u){for(let n=0;n>2]>>8*(n&3);return u}function i(e,u,n,g,h){n=n||64,e=c.normalizeInput(e),g&&(g=c.normalizeInput(g)),h&&(h=c.normalizeInput(h));const y=I(n,u,g,h);return E(y,e),a(y)}function t(e,u,n,g,h){const y=i(e,u,n,g,h);return c.toHex(y)}return D={blake2b:i,blake2bHex:t,blake2bInit:I,blake2bUpdate:E,blake2bFinal:a},D}var O,v;function oe(){if(v)return O;v=1;const c=K();function r(a,i){return a[i]^a[i+1]<<8^a[i+2]<<16^a[i+3]<<24}function f(a,i,t,e,u,n){s[a]=s[a]+s[i]+u,s[e]=p(s[e]^s[a],16),s[t]=s[t]+s[e],s[i]=p(s[i]^s[t],12),s[a]=s[a]+s[i]+n,s[e]=p(s[e]^s[a],8),s[t]=s[t]+s[e],s[i]=p(s[i]^s[t],7)}function p(a,i){return a>>>i^a<<32-i}const d=new Uint32Array([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),b=new Uint8Array([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,14,10,4,8,9,15,13,6,1,12,0,2,11,7,5,3,11,8,12,0,5,2,15,13,10,14,3,6,7,1,9,4,7,9,3,1,13,12,11,14,2,6,5,10,4,0,15,8,9,0,5,7,2,4,10,15,14,1,11,12,6,8,3,13,2,12,6,10,0,11,8,3,4,13,7,5,15,14,1,9,12,5,1,15,14,13,4,10,0,7,6,3,9,2,8,11,13,11,7,14,12,1,3,9,5,0,15,4,8,6,2,10,6,15,14,9,11,3,0,8,12,2,13,7,1,4,10,5,10,2,8,4,7,6,1,5,15,11,9,14,3,12,13,0]),s=new Uint32Array(16),o=new Uint32Array(16);function l(a,i){let t=0;for(t=0;t<8;t++)s[t]=a.h[t],s[t+8]=d[t];for(s[12]^=a.t,s[13]^=a.t/4294967296,i&&(s[14]=~s[14]),t=0;t<16;t++)o[t]=r(a.b,4*t);for(t=0;t<10;t++)f(0,4,8,12,o[b[t*16+0]],o[b[t*16+1]]),f(1,5,9,13,o[b[t*16+2]],o[b[t*16+3]]),f(2,6,10,14,o[b[t*16+4]],o[b[t*16+5]]),f(3,7,11,15,o[b[t*16+6]],o[b[t*16+7]]),f(0,5,10,15,o[b[t*16+8]],o[b[t*16+9]]),f(1,6,11,12,o[b[t*16+10]],o[b[t*16+11]]),f(2,7,8,13,o[b[t*16+12]],o[b[t*16+13]]),f(3,4,9,14,o[b[t*16+14]],o[b[t*16+15]]);for(t=0;t<8;t++)a.h[t]^=s[t]^s[t+8]}function m(a,i){if(!(a>0&&a<=32))throw new Error("Incorrect output length, should be in [1, 32]");const t=i?i.length:0;if(i&&!(t>0&&t<=32))throw new Error("Incorrect key length, should be in [1, 32]");const e={h:new Uint32Array(d),b:new Uint8Array(64),c:0,t:0,outlen:a};return e.h[0]^=16842752^t<<8^a,t>0&&(k(e,i),e.c=64),e}function k(a,i){for(let t=0;t>2]>>8*(t&3)&255;return i}function I(a,i,t){t=t||32,a=c.normalizeInput(a);const e=m(t,i);return k(e,a),A(e)}function E(a,i,t){const e=I(a,i,t);return c.toHex(e)}return O={blake2s:I,blake2sHex:E,blake2sInit:m,blake2sUpdate:k,blake2sFinal:A},O}var j,x;function ie(){if(x)return j;x=1;const c=re(),r=oe();return j={blake2b:c.blake2b,blake2bHex:c.blake2bHex,blake2bInit:c.blake2bInit,blake2bUpdate:c.blake2bUpdate,blake2bFinal:c.blake2bFinal,blake2s:r.blake2s,blake2sHex:r.blake2sHex,blake2sInit:r.blake2sInit,blake2sUpdate:r.blake2sUpdate,blake2sFinal:r.blake2sFinal},j}var z=ie();const Y=G({bits:24,rounds:23,rightRotations:8,leftRotations:3});function H(c){const r=z.blake2bHex(c,null,12);return[parseInt(r.slice(0,6),16),parseInt(r.slice(6,12),16),parseInt(r.slice(12,18),16),parseInt(r.slice(18,24),16)]}function ce(c,r){const f=globalThis.crypto.getRandomValues(new Uint32Array(1))[0]&16777215,p=Array.from(c,(d,b)=>{const s=f*16777216+(b&16777215),o=Y.encrypt(s,r);return(d.codePointAt(0)^o)>>>0});return[f,...p]}function se(c,r){if(!c||c.length===0)return"";const f=c[0];return c.slice(1).map((d,b)=>{const s=f*16777216+(b&16777215),o=Y.encrypt(s,r),l=(d^o)>>>0;try{return String.fromCodePoint(l)}catch{return""}}).join("")}const $=G();function L(c){const r=z.blake2bHex(c,null,8);return[parseInt(r.slice(0,4),16),parseInt(r.slice(4,8),16),parseInt(r.slice(8,12),16),parseInt(r.slice(12,16),16)]}function le(c,r){return Array.from(c,f=>$.encrypt(f.codePointAt(0),r))}function ue(c,r){return c.map(f=>{try{return String.fromCodePoint($.decrypt(f,r))}catch{return""}}).join("")}const U=document.getElementById("textarea"),M=document.getElementById("encoder"),ae=document.getElementById("cipher"),V=document.getElementById("sign"),F=document.getElementById("sigDetect"),R={3:"",6:"",8:"\uFEFF"};document.getElementById("encodeButton").addEventListener("click",W);document.getElementById("decodeButton").addEventListener("click",W);V.addEventListener("click",c=>c.target.classList.toggle("on"));let q;function W(c){if(clearTimeout(q),F.className="",U.value===""){U.value="The text box is empty.";return}const r=c.target.id==="encodeButton"?"NO":"YES",f=fe();let p=M.value.split("-")[1],d=U.value;if(r==="YES"){const o=Object.keys(R).find(l=>d.includes(R[l]));o&&(o!==p&&(F.textContent=`ZWUS-${o} signature detected`,F.className="show",q=setTimeout(()=>F.className="",2e3)),p=o,M.value="ZWUS-"+p,d=d.replace(R[p],""))}const b=f!=="PLAIN",s=b&&prompt("enter password.");if(!(b&&!s)){try{let o=de[r][f](d,p,s);r==="NO"&&V.classList.contains("on")&&(o=R[p]+o),U.value=o}catch(o){console.log(o)}r==="NO"&&(U.select(),document.execCommand("copy"),U.value=`Copied to your clipboard.
+ A copy has been placed between these brackets [`+U.value+"]")}}function fe(){return ae.value}const de={NO:{PLAIN:(c,r)=>w.encodeString(c,r),SPECK48_96CTR:(c,r,f)=>w.encodeNumberArray(ce(c,H(f)),r),"SPECK32_64ECB (insecure)":(c,r,f)=>w.encodeNumberArray(le(c,L(f)),r)},YES:{PLAIN:(c,r)=>w.decodeToString(c,r),SPECK48_96CTR:(c,r,f)=>se(w.decodeToNumberArray(c,r),H(f)),"SPECK32_64ECB (insecure)":(c,r,f)=>ue(w.decodeToNumberArray(c,r),L(f))}};
diff --git a/dist/web/assets/index-BsThwXwS.css b/dist/web/assets/index-BsThwXwS.css
deleted file mode 100644
index 15b0fb9..0000000
--- a/dist/web/assets/index-BsThwXwS.css
+++ /dev/null
@@ -1 +0,0 @@
-@font-face{font-family:Open Sans;font-style:normal;font-weight:400;font-display:swap;src:url(/assets/open-sans-v44-latin-regular-Bk63H6sG.woff2) format("woff2")}html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,big,cite,code,del,dfn,em,img,ins,kbd,q,s,samp,small,strike,strong,sub,sup,tt,var,b,u,i,center,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td,article,aside,canvas,details,embed,figure,figcaption,footer,header,hgroup,menu,nav,output,ruby,section,summary,time,mark,audio,video{margin:0;padding:0;border:0;font-size:100%;font:inherit;vertical-align:baseline}article,aside,details,figcaption,figure,footer,header,hgroup,menu,nav,section{display:block}body{font-family:Open Sans,sans-serif;background-color:#002b4d;width:500px;height:320px;line-height:1;border:1.5px solid rgb(0,126,199)}#overbar{padding:1.5%;font-size:10px;font-weight:700;margin-bottom:0;color:#e5f4ff99;border-bottom:1px solid rgb(0,126,199,.5)}#homepage{position:fixed;text-decoration:none;color:#ff0;right:2.5%}#textarea{background-color:#e6e6e6;margin:1.5%;width:95.5%;height:69%;font-family:Open Sans,sans-serif;font-size:13px;font-style:normal;font-variant:normal;font-weight:400;line-height:20px}input{font-size:11.5px}#encodeButton{display:inline-block;margin-bottom:0;margin-left:1.5%;color:#002b4d;cursor:pointer}#decodeButton{margin-bottom:0;margin-left:1.5%;color:#002b4d;cursor:pointer}select{display:inline-block;margin-bottom:0;margin-left:1.5%;color:#002b4d;background-color:#e6e6e6;text-align:center;font-size:11px;width:8em;vertical-align:middle}#encodeButton,#decodeButton{vertical-align:middle}#sign{margin-left:1.5%;font-size:11px;padding:1px 8px;border-radius:99px;border:1px solid rgba(229,244,255,.2);background:transparent;color:#e5f4ff59;cursor:pointer;vertical-align:middle}#sign:hover{border-color:#e5f4ff59;color:#e5f4ff80}#sign.on{background:#e6e6e6;border-color:#e6e6e6;color:#002b4d}#sign.on:hover{background:#fff;border-color:#fff}#notice{font-size:10px;margin-top:1.5%;padding:.8% 0% 0% 1.7%;color:#e5f4ff99;border-top:1px solid rgb(0,126,199,.5)}#versions{color:#007ec7;text-decoration:none}
diff --git a/dist/web/assets/index-CRFZe-9x.js b/dist/web/assets/index-CRFZe-9x.js
deleted file mode 100644
index bc49bd8..0000000
--- a/dist/web/assets/index-CRFZe-9x.js
+++ /dev/null
@@ -1,4 +0,0 @@
-(function(){const r=document.createElement("link").relList;if(r&&r.supports&&r.supports("modulepreload"))return;for(const d of document.querySelectorAll('link[rel="modulepreload"]'))h(d);new MutationObserver(d=>{for(const b of d)if(b.type==="childList")for(const c of b.addedNodes)c.tagName==="LINK"&&c.rel==="modulepreload"&&h(c)}).observe(document,{childList:!0,subtree:!0});function f(d){const b={};return d.integrity&&(b.integrity=d.integrity),d.referrerPolicy&&(b.referrerPolicy=d.referrerPolicy),d.crossOrigin==="use-credentials"?b.credentials="include":d.crossOrigin==="anonymous"?b.credentials="omit":b.credentials="same-origin",b}function h(d){if(d.ep)return;d.ep=!0;const b=f(d);fetch(d.href,b)}})();const w={3:{unifier:"",0:"",1:"",2:""},6:{unifier:"",0:"",1:"",2:"",3:"",4:"",5:""},8:{unifier:"",0:"",1:"",2:"",3:"",4:"",5:"",6:"",7:"\uFEFF"},encodeString:(i,r=3)=>Array.from(i,f=>f.codePointAt(0).toString(r).split("").map(h=>w[r][h]).join("")).join(w[r].unifier),encodeNumberArray:(i,r=3)=>i.map(f=>f.toString(r).split("").map(h=>w[r][h]).join("")).join(w[r].unifier),decodeToString:(i,r=3)=>i.split(w[r].unifier).map(f=>String.fromCodePoint(parseInt(Array.from(f).map(h=>Object.keys(w[r]).find(d=>w[r][d]===h)).join(""),r))).join(""),decodeToNumberArray:(i,r=3)=>i.split(w[r].unifier).map(f=>parseInt(Array.from(f).map(h=>Object.keys(w[r]).find(d=>w[r][d]===h)).join(""),r))};function X(i){return i&&i.__esModule&&Object.prototype.hasOwnProperty.call(i,"default")?i.default:i}var F,_;function J(){if(_)return F;_=1;function i(r={}){const f=r.bits||16,h=r.rounds||22,d=r.rightRotations||7,b=r.leftRotations||2,c=2**f,s=c-1,a=(o,t)=>o>>t|o<o<>f-t,k=(o,t,e)=>(o=a(o,d),o=o+t&s,o^=e,t=y(t,b),t^=o,[o,t]),A=(o,t,e)=>(t^=o,t=a(t,b),o^=e,o=o-t&s,o=y(o,d),[o,t]);function I(o,t){let e=o[0],l=o[1],n=t[0],p=t.slice(1);[l,e]=k(l,e,n);for(let g=0;g{const l=o([t/c|0,t&s],e);return l[0]*c+l[1]}}return{encrypt:u(I),decrypt:u(E),encryptRaw:I,decryptRaw:E}}return F=i,F}var Q=J();const x=X(Q);var R,j;function L(){if(j)return R;j=1;const i="Input must be an string, Buffer or Uint8Array";function r(c){let s;if(c instanceof Uint8Array)s=c;else if(typeof c=="string")s=new TextEncoder().encode(c);else throw new Error(i);return s}function f(c){return Array.prototype.map.call(c,function(s){return(s<16?"0":"")+s.toString(16)}).join("")}function h(c){return(4294967296+c).toString(16).substring(1)}function d(c,s,a){let y=`
-`+c+" = ";for(let k=0;k=4294967296&&g++,e[l]=p,e[l+1]=g}function f(e,l,n,p){let g=e[l]+n;n<0&&(g+=4294967296);let m=e[l+1]+p;g>=4294967296&&m++,e[l]=g,e[l+1]=m}function h(e,l){return e[l]^e[l+1]<<8^e[l+2]<<16^e[l+3]<<24}function d(e,l,n,p,g,m){const z=y[g],V=y[g+1],Y=y[m],$=y[m+1];r(a,e,l),f(a,e,z,V);let U=a[p]^a[e],B=a[p+1]^a[e+1];a[p]=B,a[p+1]=U,r(a,n,p),U=a[l]^a[n],B=a[l+1]^a[n+1],a[l]=U>>>24^B<<8,a[l+1]=B>>>24^U<<8,r(a,e,l),f(a,e,Y,$),U=a[p]^a[e],B=a[p+1]^a[e+1],a[p]=U>>>16^B<<16,a[p+1]=B>>>16^U<<16,r(a,n,p),U=a[l]^a[n],B=a[l+1]^a[n+1],a[l]=B>>>31^U<<1,a[l+1]=U>>>31^B<<1}const b=new Uint32Array([4089235720,1779033703,2227873595,3144134277,4271175723,1013904242,1595750129,2773480762,2917565137,1359893119,725511199,2600822924,4215389547,528734635,327033209,1541459225]),c=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,14,10,4,8,9,15,13,6,1,12,0,2,11,7,5,3,11,8,12,0,5,2,15,13,10,14,3,6,7,1,9,4,7,9,3,1,13,12,11,14,2,6,5,10,4,0,15,8,9,0,5,7,2,4,10,15,14,1,11,12,6,8,3,13,2,12,6,10,0,11,8,3,4,13,7,5,15,14,1,9,12,5,1,15,14,13,4,10,0,7,6,3,9,2,8,11,13,11,7,14,12,1,3,9,5,0,15,4,8,6,2,10,6,15,14,9,11,3,0,8,12,2,13,7,1,4,10,5,10,2,8,4,7,6,1,5,15,11,9,14,3,12,13,0,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,14,10,4,8,9,15,13,6,1,12,0,2,11,7,5,3],s=new Uint8Array(c.map(function(e){return e*2})),a=new Uint32Array(32),y=new Uint32Array(32);function k(e,l){let n=0;for(n=0;n<16;n++)a[n]=e.h[n],a[n+16]=b[n];for(a[24]=a[24]^e.t,a[25]=a[25]^e.t/4294967296,l&&(a[28]=~a[28],a[29]=~a[29]),n=0;n<32;n++)y[n]=h(e.b,4*n);for(n=0;n<12;n++)d(0,8,16,24,s[n*16+0],s[n*16+1]),d(2,10,18,26,s[n*16+2],s[n*16+3]),d(4,12,20,28,s[n*16+4],s[n*16+5]),d(6,14,22,30,s[n*16+6],s[n*16+7]),d(0,10,20,30,s[n*16+8],s[n*16+9]),d(2,12,22,24,s[n*16+10],s[n*16+11]),d(4,14,16,26,s[n*16+12],s[n*16+13]),d(6,8,18,28,s[n*16+14],s[n*16+15]);for(n=0;n<16;n++)e.h[n]=e.h[n]^a[n]^a[n+16]}const A=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]);function I(e,l,n,p){if(e===0||e>64)throw new Error("Illegal output length, expected 0 < length <= 64");if(l&&l.length>64)throw new Error("Illegal key, expected Uint8Array with 0 < length <= 64");if(n&&n.length!==16)throw new Error("Illegal salt, expected Uint8Array with length is 16");if(p&&p.length!==16)throw new Error("Illegal personal, expected Uint8Array with length is 16");const g={b:new Uint8Array(128),h:new Uint32Array(16),t:0,c:0,outlen:e};A.fill(0),A[0]=e,l&&(A[1]=l.length),A[2]=1,A[3]=1,n&&A.set(n,32),p&&A.set(p,48);for(let m=0;m<16;m++)g.h[m]=b[m]^h(A,m*4);return l&&(E(g,l),g.c=128),g}function E(e,l){for(let n=0;n>2]>>8*(n&3);return l}function o(e,l,n,p,g){n=n||64,e=i.normalizeInput(e),p&&(p=i.normalizeInput(p)),g&&(g=i.normalizeInput(g));const m=I(n,l,p,g);return E(m,e),u(m)}function t(e,l,n,p,g){const m=o(e,l,n,p,g);return i.toHex(m)}return T={blake2b:o,blake2bHex:t,blake2bInit:I,blake2bUpdate:E,blake2bFinal:u},T}var C,D;function Z(){if(D)return C;D=1;const i=L();function r(u,o){return u[o]^u[o+1]<<8^u[o+2]<<16^u[o+3]<<24}function f(u,o,t,e,l,n){c[u]=c[u]+c[o]+l,c[e]=h(c[e]^c[u],16),c[t]=c[t]+c[e],c[o]=h(c[o]^c[t],12),c[u]=c[u]+c[o]+n,c[e]=h(c[e]^c[u],8),c[t]=c[t]+c[e],c[o]=h(c[o]^c[t],7)}function h(u,o){return u>>>o^u<<32-o}const d=new Uint32Array([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),b=new Uint8Array([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,14,10,4,8,9,15,13,6,1,12,0,2,11,7,5,3,11,8,12,0,5,2,15,13,10,14,3,6,7,1,9,4,7,9,3,1,13,12,11,14,2,6,5,10,4,0,15,8,9,0,5,7,2,4,10,15,14,1,11,12,6,8,3,13,2,12,6,10,0,11,8,3,4,13,7,5,15,14,1,9,12,5,1,15,14,13,4,10,0,7,6,3,9,2,8,11,13,11,7,14,12,1,3,9,5,0,15,4,8,6,2,10,6,15,14,9,11,3,0,8,12,2,13,7,1,4,10,5,10,2,8,4,7,6,1,5,15,11,9,14,3,12,13,0]),c=new Uint32Array(16),s=new Uint32Array(16);function a(u,o){let t=0;for(t=0;t<8;t++)c[t]=u.h[t],c[t+8]=d[t];for(c[12]^=u.t,c[13]^=u.t/4294967296,o&&(c[14]=~c[14]),t=0;t<16;t++)s[t]=r(u.b,4*t);for(t=0;t<10;t++)f(0,4,8,12,s[b[t*16+0]],s[b[t*16+1]]),f(1,5,9,13,s[b[t*16+2]],s[b[t*16+3]]),f(2,6,10,14,s[b[t*16+4]],s[b[t*16+5]]),f(3,7,11,15,s[b[t*16+6]],s[b[t*16+7]]),f(0,5,10,15,s[b[t*16+8]],s[b[t*16+9]]),f(1,6,11,12,s[b[t*16+10]],s[b[t*16+11]]),f(2,7,8,13,s[b[t*16+12]],s[b[t*16+13]]),f(3,4,9,14,s[b[t*16+14]],s[b[t*16+15]]);for(t=0;t<8;t++)u.h[t]^=c[t]^c[t+8]}function y(u,o){if(!(u>0&&u<=32))throw new Error("Incorrect output length, should be in [1, 32]");const t=o?o.length:0;if(o&&!(t>0&&t<=32))throw new Error("Incorrect key length, should be in [1, 32]");const e={h:new Uint32Array(d),b:new Uint8Array(64),c:0,t:0,outlen:u};return e.h[0]^=16842752^t<<8^u,t>0&&(k(e,o),e.c=64),e}function k(u,o){for(let t=0;t>2]>>8*(t&3)&255;return o}function I(u,o,t){t=t||32,u=i.normalizeInput(u);const e=y(t,o);return k(e,u),A(e)}function E(u,o,t){const e=I(u,o,t);return i.toHex(e)}return C={blake2s:I,blake2sHex:E,blake2sInit:y,blake2sUpdate:k,blake2sFinal:A},C}var O,H;function ee(){if(H)return O;H=1;const i=W(),r=Z();return O={blake2b:i.blake2b,blake2bHex:i.blake2bHex,blake2bInit:i.blake2bInit,blake2bUpdate:i.blake2bUpdate,blake2bFinal:i.blake2bFinal,blake2s:r.blake2s,blake2sHex:r.blake2sHex,blake2sInit:r.blake2sInit,blake2sUpdate:r.blake2sUpdate,blake2sFinal:r.blake2sFinal},O}var M=ee();const q=x({bits:24,rounds:23,rightRotations:8,leftRotations:3});function N(i){const r=M.blake2bHex(i,null,12);return[parseInt(r.slice(0,6),16),parseInt(r.slice(6,12),16),parseInt(r.slice(12,18),16),parseInt(r.slice(18,24),16)]}function te(i,r){const f=globalThis.crypto.getRandomValues(new Uint32Array(1))[0]&16777215,h=Array.from(i,(d,b)=>{const c=f*16777216+(b&16777215),s=q.encrypt(c,r);return(d.codePointAt(0)^s)>>>0});return[f,...h]}function ne(i,r){if(!i||i.length===0)return"";const f=i[0];return i.slice(1).map((d,b)=>{const c=f*16777216+(b&16777215),s=q.encrypt(c,r),a=(d^s)>>>0;try{return String.fromCodePoint(a)}catch{return""}}).join("")}const G=x();function v(i){const r=M.blake2bHex(i,null,8);return[parseInt(r.slice(0,4),16),parseInt(r.slice(4,8),16),parseInt(r.slice(8,12),16),parseInt(r.slice(12,16),16)]}function re(i,r){return Array.from(i,f=>G.encrypt(f.codePointAt(0),r))}function oe(i,r){return i.map(f=>{try{return String.fromCodePoint(G.decrypt(f,r))}catch{return""}}).join("")}const S=document.getElementById("textarea"),ie=document.getElementById("encoder"),ce=document.getElementById("cipher");document.getElementById("encodeButton").addEventListener("click",K);document.getElementById("decodeButton").addEventListener("click",K);document.getElementById("sign").addEventListener("click",i=>i.target.classList.toggle("on"));function K(i){if(S.value===""){S.value="The text box is empty.";return}const r=i.target.id==="encodeButton"?"NO":"YES",f=se(),h=ie.value.split("-")[1],d=f!=="PLAIN",b=d&&prompt("enter password.");if(!(d&&!b)){try{S.value=le[r][f](S.value,h,b)}catch(c){console.log(c)}r==="NO"&&(S.select(),document.execCommand("copy"),S.value=`Copied to your clipboard.
- A copy has been placed between these brackets [`+S.value+"]")}}function se(){return ce.value}const le={NO:{PLAIN:(i,r)=>w.encodeString(i,r),SPECK48_96CTR:(i,r,f)=>w.encodeNumberArray(te(i,N(f)),r),"SPECK32_64ECB (insecure)":(i,r,f)=>w.encodeNumberArray(re(i,v(f)),r)},YES:{PLAIN:(i,r)=>w.decodeToString(i,r),SPECK48_96CTR:(i,r,f)=>ne(w.decodeToNumberArray(i,r),N(f)),"SPECK32_64ECB (insecure)":(i,r,f)=>oe(w.decodeToNumberArray(i,r),v(f))}};
diff --git a/dist/web/assets/index-CSA6TclE.css b/dist/web/assets/index-CSA6TclE.css
new file mode 100644
index 0000000..c37eea7
--- /dev/null
+++ b/dist/web/assets/index-CSA6TclE.css
@@ -0,0 +1 @@
+@font-face{font-family:Open Sans;font-style:normal;font-weight:400;font-display:swap;src:url(/assets/open-sans-v44-latin-regular-Bk63H6sG.woff2) format("woff2")}html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,big,cite,code,del,dfn,em,img,ins,kbd,q,s,samp,small,strike,strong,sub,sup,tt,var,b,u,i,center,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td,article,aside,canvas,details,embed,figure,figcaption,footer,header,hgroup,menu,nav,output,ruby,section,summary,time,mark,audio,video{margin:0;padding:0;border:0;font-size:100%;font:inherit;vertical-align:baseline}article,aside,details,figcaption,figure,footer,header,hgroup,menu,nav,section{display:block}body{font-family:Open Sans,sans-serif;background-color:#002b4d;width:500px;height:320px;line-height:1;border:1.5px solid rgb(0,126,199)}#overbar{position:relative;padding:1.5%;font-size:10px;font-weight:700;margin-bottom:0;color:#e5f4ff99;border-bottom:1px solid rgb(0,126,199,.5)}#sigDetect{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);font-weight:400;color:#e5f4ffd9;opacity:0;transition:opacity 1s}#sigDetect.show{opacity:1;transition:none}#homepage{position:fixed;text-decoration:none;color:#ff0;right:2.5%}#textarea{background-color:#e6e6e6;margin:1.5%;width:95.5%;height:69%;font-family:Open Sans,sans-serif;font-size:13px;font-style:normal;font-variant:normal;font-weight:400;line-height:20px}input{font-size:11.5px}#encodeButton{display:inline-block;margin-bottom:0;margin-left:1.5%;color:#002b4d;cursor:pointer}#decodeButton{margin-bottom:0;margin-left:1.5%;color:#002b4d;cursor:pointer}select{display:inline-block;margin-bottom:0;margin-left:1.5%;color:#002b4d;background-color:#e6e6e6;text-align:center;font-size:11px;width:8em;vertical-align:middle}#encodeButton,#decodeButton{vertical-align:middle}#sign{margin-left:1.5%;font-size:11px;padding:1px 8px;border-radius:99px;border:1px solid rgba(229,244,255,.2);background:transparent;color:#e5f4ff59;cursor:pointer;vertical-align:middle}#sign:hover{border-color:#e5f4ff59;color:#e5f4ff80}#sign.on{background:#e6e6e6;border-color:#e6e6e6;color:#002b4d}#sign.on:hover{background:#fff;border-color:#fff}#notice{font-size:10px;margin-top:1.5%;padding:.8% 0% 0% 1.7%;color:#e5f4ff99;border-top:1px solid rgb(0,126,199,.5)}#versions{color:#007ec7;text-decoration:none}
diff --git a/dist/web/assets/index-C__Rgwrh.js b/dist/web/assets/index-C__Rgwrh.js
new file mode 100644
index 0000000..001cd0b
--- /dev/null
+++ b/dist/web/assets/index-C__Rgwrh.js
@@ -0,0 +1,4 @@
+(function(){const r=document.createElement("link").relList;if(r&&r.supports&&r.supports("modulepreload"))return;for(const d of document.querySelectorAll('link[rel="modulepreload"]'))p(d);new MutationObserver(d=>{for(const b of d)if(b.type==="childList")for(const s of b.addedNodes)s.tagName==="LINK"&&s.rel==="modulepreload"&&p(s)}).observe(document,{childList:!0,subtree:!0});function f(d){const b={};return d.integrity&&(b.integrity=d.integrity),d.referrerPolicy&&(b.referrerPolicy=d.referrerPolicy),d.crossOrigin==="use-credentials"?b.credentials="include":d.crossOrigin==="anonymous"?b.credentials="omit":b.credentials="same-origin",b}function p(d){if(d.ep)return;d.ep=!0;const b=f(d);fetch(d.href,b)}})();const w={3:{unifier:"",0:"",1:"",2:""},6:{unifier:"",0:"",1:"",2:"",3:"",4:"",5:""},8:{unifier:"",0:"",1:"",2:"",3:"",4:"",5:"",6:"",7:"\uFEFF"},encodeString:(c,r=3)=>Array.from(c,f=>f.codePointAt(0).toString(r).split("").map(p=>w[r][p]).join("")).join(w[r].unifier),encodeNumberArray:(c,r=3)=>c.map(f=>f.toString(r).split("").map(p=>w[r][p]).join("")).join(w[r].unifier),decodeToString:(c,r=3)=>c.split(w[r].unifier).map(f=>String.fromCodePoint(parseInt(Array.from(f).map(p=>Object.keys(w[r]).find(d=>w[r][d]===p)).join(""),r))).join(""),decodeToNumberArray:(c,r=3)=>c.split(w[r].unifier).map(f=>parseInt(Array.from(f).map(p=>Object.keys(w[r]).find(d=>w[r][d]===p)).join(""),r))};function ee(c){return c&&c.__esModule&&Object.prototype.hasOwnProperty.call(c,"default")?c.default:c}var T,_;function te(){if(_)return T;_=1;function c(r={}){const f=r.bits||16,p=r.rounds||22,d=r.rightRotations||7,b=r.leftRotations||2,s=2**f,o=s-1,l=(i,t)=>i>>t|i<i<>f-t,k=(i,t,e)=>(i=l(i,d),i=i+t&o,i^=e,t=m(t,b),t^=i,[i,t]),A=(i,t,e)=>(t^=i,t=l(t,b),i^=e,i=i-t&o,i=m(i,d),[i,t]);function I(i,t){let e=i[0],u=i[1],n=t[0],g=t.slice(1);[u,e]=k(u,e,n);for(let h=0;h{const u=i([t/s|0,t&o],e);return u[0]*s+u[1]}}return{encrypt:a(I),decrypt:a(E),encryptRaw:I,decryptRaw:E}}return T=c,T}var ne=te();const G=ee(ne);var C,N;function K(){if(N)return C;N=1;const c="Input must be an string, Buffer or Uint8Array";function r(s){let o;if(s instanceof Uint8Array)o=s;else if(typeof s=="string")o=new TextEncoder().encode(s);else throw new Error(c);return o}function f(s){return Array.prototype.map.call(s,function(o){return(o<16?"0":"")+o.toString(16)}).join("")}function p(s){return(4294967296+s).toString(16).substring(1)}function d(s,o,l){let m=`
+`+s+" = ";for(let k=0;k=4294967296&&h++,e[u]=g,e[u+1]=h}function f(e,u,n,g){let h=e[u]+n;n<0&&(h+=4294967296);let y=e[u+1]+g;h>=4294967296&&y++,e[u]=h,e[u+1]=y}function p(e,u){return e[u]^e[u+1]<<8^e[u+2]<<16^e[u+3]<<24}function d(e,u,n,g,h,y){const Z=m[h],X=m[h+1],J=m[y],Q=m[y+1];r(l,e,u),f(l,e,Z,X);let B=l[g]^l[e],S=l[g+1]^l[e+1];l[g]=S,l[g+1]=B,r(l,n,g),B=l[u]^l[n],S=l[u+1]^l[n+1],l[u]=B>>>24^S<<8,l[u+1]=S>>>24^B<<8,r(l,e,u),f(l,e,J,Q),B=l[g]^l[e],S=l[g+1]^l[e+1],l[g]=B>>>16^S<<16,l[g+1]=S>>>16^B<<16,r(l,n,g),B=l[u]^l[n],S=l[u+1]^l[n+1],l[u]=S>>>31^B<<1,l[u+1]=B>>>31^S<<1}const b=new Uint32Array([4089235720,1779033703,2227873595,3144134277,4271175723,1013904242,1595750129,2773480762,2917565137,1359893119,725511199,2600822924,4215389547,528734635,327033209,1541459225]),s=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,14,10,4,8,9,15,13,6,1,12,0,2,11,7,5,3,11,8,12,0,5,2,15,13,10,14,3,6,7,1,9,4,7,9,3,1,13,12,11,14,2,6,5,10,4,0,15,8,9,0,5,7,2,4,10,15,14,1,11,12,6,8,3,13,2,12,6,10,0,11,8,3,4,13,7,5,15,14,1,9,12,5,1,15,14,13,4,10,0,7,6,3,9,2,8,11,13,11,7,14,12,1,3,9,5,0,15,4,8,6,2,10,6,15,14,9,11,3,0,8,12,2,13,7,1,4,10,5,10,2,8,4,7,6,1,5,15,11,9,14,3,12,13,0,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,14,10,4,8,9,15,13,6,1,12,0,2,11,7,5,3],o=new Uint8Array(s.map(function(e){return e*2})),l=new Uint32Array(32),m=new Uint32Array(32);function k(e,u){let n=0;for(n=0;n<16;n++)l[n]=e.h[n],l[n+16]=b[n];for(l[24]=l[24]^e.t,l[25]=l[25]^e.t/4294967296,u&&(l[28]=~l[28],l[29]=~l[29]),n=0;n<32;n++)m[n]=p(e.b,4*n);for(n=0;n<12;n++)d(0,8,16,24,o[n*16+0],o[n*16+1]),d(2,10,18,26,o[n*16+2],o[n*16+3]),d(4,12,20,28,o[n*16+4],o[n*16+5]),d(6,14,22,30,o[n*16+6],o[n*16+7]),d(0,10,20,30,o[n*16+8],o[n*16+9]),d(2,12,22,24,o[n*16+10],o[n*16+11]),d(4,14,16,26,o[n*16+12],o[n*16+13]),d(6,8,18,28,o[n*16+14],o[n*16+15]);for(n=0;n<16;n++)e.h[n]=e.h[n]^l[n]^l[n+16]}const A=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]);function I(e,u,n,g){if(e===0||e>64)throw new Error("Illegal output length, expected 0 < length <= 64");if(u&&u.length>64)throw new Error("Illegal key, expected Uint8Array with 0 < length <= 64");if(n&&n.length!==16)throw new Error("Illegal salt, expected Uint8Array with length is 16");if(g&&g.length!==16)throw new Error("Illegal personal, expected Uint8Array with length is 16");const h={b:new Uint8Array(128),h:new Uint32Array(16),t:0,c:0,outlen:e};A.fill(0),A[0]=e,u&&(A[1]=u.length),A[2]=1,A[3]=1,n&&A.set(n,32),g&&A.set(g,48);for(let y=0;y<16;y++)h.h[y]=b[y]^p(A,y*4);return u&&(E(h,u),h.c=128),h}function E(e,u){for(let n=0;n>2]>>8*(n&3);return u}function i(e,u,n,g,h){n=n||64,e=c.normalizeInput(e),g&&(g=c.normalizeInput(g)),h&&(h=c.normalizeInput(h));const y=I(n,u,g,h);return E(y,e),a(y)}function t(e,u,n,g,h){const y=i(e,u,n,g,h);return c.toHex(y)}return D={blake2b:i,blake2bHex:t,blake2bInit:I,blake2bUpdate:E,blake2bFinal:a},D}var O,v;function oe(){if(v)return O;v=1;const c=K();function r(a,i){return a[i]^a[i+1]<<8^a[i+2]<<16^a[i+3]<<24}function f(a,i,t,e,u,n){s[a]=s[a]+s[i]+u,s[e]=p(s[e]^s[a],16),s[t]=s[t]+s[e],s[i]=p(s[i]^s[t],12),s[a]=s[a]+s[i]+n,s[e]=p(s[e]^s[a],8),s[t]=s[t]+s[e],s[i]=p(s[i]^s[t],7)}function p(a,i){return a>>>i^a<<32-i}const d=new Uint32Array([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),b=new Uint8Array([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,14,10,4,8,9,15,13,6,1,12,0,2,11,7,5,3,11,8,12,0,5,2,15,13,10,14,3,6,7,1,9,4,7,9,3,1,13,12,11,14,2,6,5,10,4,0,15,8,9,0,5,7,2,4,10,15,14,1,11,12,6,8,3,13,2,12,6,10,0,11,8,3,4,13,7,5,15,14,1,9,12,5,1,15,14,13,4,10,0,7,6,3,9,2,8,11,13,11,7,14,12,1,3,9,5,0,15,4,8,6,2,10,6,15,14,9,11,3,0,8,12,2,13,7,1,4,10,5,10,2,8,4,7,6,1,5,15,11,9,14,3,12,13,0]),s=new Uint32Array(16),o=new Uint32Array(16);function l(a,i){let t=0;for(t=0;t<8;t++)s[t]=a.h[t],s[t+8]=d[t];for(s[12]^=a.t,s[13]^=a.t/4294967296,i&&(s[14]=~s[14]),t=0;t<16;t++)o[t]=r(a.b,4*t);for(t=0;t<10;t++)f(0,4,8,12,o[b[t*16+0]],o[b[t*16+1]]),f(1,5,9,13,o[b[t*16+2]],o[b[t*16+3]]),f(2,6,10,14,o[b[t*16+4]],o[b[t*16+5]]),f(3,7,11,15,o[b[t*16+6]],o[b[t*16+7]]),f(0,5,10,15,o[b[t*16+8]],o[b[t*16+9]]),f(1,6,11,12,o[b[t*16+10]],o[b[t*16+11]]),f(2,7,8,13,o[b[t*16+12]],o[b[t*16+13]]),f(3,4,9,14,o[b[t*16+14]],o[b[t*16+15]]);for(t=0;t<8;t++)a.h[t]^=s[t]^s[t+8]}function m(a,i){if(!(a>0&&a<=32))throw new Error("Incorrect output length, should be in [1, 32]");const t=i?i.length:0;if(i&&!(t>0&&t<=32))throw new Error("Incorrect key length, should be in [1, 32]");const e={h:new Uint32Array(d),b:new Uint8Array(64),c:0,t:0,outlen:a};return e.h[0]^=16842752^t<<8^a,t>0&&(k(e,i),e.c=64),e}function k(a,i){for(let t=0;t>2]>>8*(t&3)&255;return i}function I(a,i,t){t=t||32,a=c.normalizeInput(a);const e=m(t,i);return k(e,a),A(e)}function E(a,i,t){const e=I(a,i,t);return c.toHex(e)}return O={blake2s:I,blake2sHex:E,blake2sInit:m,blake2sUpdate:k,blake2sFinal:A},O}var j,x;function ie(){if(x)return j;x=1;const c=re(),r=oe();return j={blake2b:c.blake2b,blake2bHex:c.blake2bHex,blake2bInit:c.blake2bInit,blake2bUpdate:c.blake2bUpdate,blake2bFinal:c.blake2bFinal,blake2s:r.blake2s,blake2sHex:r.blake2sHex,blake2sInit:r.blake2sInit,blake2sUpdate:r.blake2sUpdate,blake2sFinal:r.blake2sFinal},j}var z=ie();const Y=G({bits:24,rounds:23,rightRotations:8,leftRotations:3});function H(c){const r=z.blake2bHex(c,null,12);return[parseInt(r.slice(0,6),16),parseInt(r.slice(6,12),16),parseInt(r.slice(12,18),16),parseInt(r.slice(18,24),16)]}function ce(c,r){const f=globalThis.crypto.getRandomValues(new Uint32Array(1))[0]&16777215,p=Array.from(c,(d,b)=>{const s=f*16777216+(b&16777215),o=Y.encrypt(s,r);return(d.codePointAt(0)^o)>>>0});return[f,...p]}function se(c,r){if(!c||c.length===0)return"";const f=c[0];return c.slice(1).map((d,b)=>{const s=f*16777216+(b&16777215),o=Y.encrypt(s,r),l=(d^o)>>>0;try{return String.fromCodePoint(l)}catch{return""}}).join("")}const $=G();function L(c){const r=z.blake2bHex(c,null,8);return[parseInt(r.slice(0,4),16),parseInt(r.slice(4,8),16),parseInt(r.slice(8,12),16),parseInt(r.slice(12,16),16)]}function le(c,r){return Array.from(c,f=>$.encrypt(f.codePointAt(0),r))}function ue(c,r){return c.map(f=>{try{return String.fromCodePoint($.decrypt(f,r))}catch{return""}}).join("")}const U=document.getElementById("textarea"),M=document.getElementById("encoder"),ae=document.getElementById("cipher"),V=document.getElementById("sign"),F=document.getElementById("sigDetect"),R={3:"",6:"",8:"\uFEFF"};document.getElementById("encodeButton").addEventListener("click",W);document.getElementById("decodeButton").addEventListener("click",W);V.addEventListener("click",c=>c.target.classList.toggle("on"));let q;function W(c){if(clearTimeout(q),F.className="",U.value===""){U.value="The text box is empty.";return}const r=c.target.id==="encodeButton"?"NO":"YES",f=fe();let p=M.value.split("-")[1],d=U.value;if(r==="YES"){const o=Object.keys(R).find(l=>d.includes(R[l]));o&&(o!==p&&(F.textContent=`ZWUS-${o} signature detected`,F.className="show",q=setTimeout(()=>F.className="",2e3)),p=o,M.value="ZWUS-"+p,d=d.replace(R[p],""))}const b=f!=="PLAIN",s=b&&prompt("enter password.");if(!(b&&!s)){try{let o=de[r][f](d,p,s);r==="NO"&&V.classList.contains("on")&&(o=R[p]+o),U.value=o}catch(o){console.log(o)}r==="NO"&&(U.select(),document.execCommand("copy"),U.value=`Copied to your clipboard.
+ A copy has been placed between these brackets [`+U.value+"]")}}function fe(){return ae.value}const de={NO:{PLAIN:(c,r)=>w.encodeString(c,r),SPECK48_96CTR:(c,r,f)=>w.encodeNumberArray(ce(c,H(f)),r),"SPECK32_64ECB (insecure)":(c,r,f)=>w.encodeNumberArray(le(c,L(f)),r)},YES:{PLAIN:(c,r)=>w.decodeToString(c,r),SPECK48_96CTR:(c,r,f)=>se(w.decodeToNumberArray(c,r),H(f)),"SPECK32_64ECB (insecure)":(c,r,f)=>ue(w.decodeToNumberArray(c,r),L(f))}};
diff --git a/dist/web/index.html b/dist/web/index.html
index ddf3d1d..870d3db 100644
--- a/dist/web/index.html
+++ b/dist/web/index.html
@@ -3,11 +3,11 @@
-
-
+
+
-
+
diff --git a/index.html b/index.html
index 6b3e4d7..9c6f662 100644
--- a/index.html
+++ b/index.html
@@ -6,7 +6,7 @@
-
+
diff --git a/style.css b/style.css
index adfdfff..60db6c8 100644
--- a/style.css
+++ b/style.css
@@ -42,6 +42,7 @@ body {
}
#overbar {
+ position: relative;
padding: 1.5%;
font-size: 10px;
font-weight: bold;
@@ -50,6 +51,22 @@ body {
border-bottom: 1px solid rgb(0, 126, 199, .5);
}
+#sigDetect {
+ position: absolute;
+ left: 50%;
+ top: 50%;
+ transform: translate(-50%, -50%);
+ font-weight: normal;
+ color: rgb(229, 244, 255, 0.85);
+ opacity: 0;
+ transition: opacity 1s;
+}
+
+#sigDetect.show {
+ opacity: 1;
+ transition: opacity .2s;
+}
+
#homepage {
position: fixed;
text-decoration: none;