//example let t='text data', fx=()=>{ cont k=0b11111111; new Blob([t]).arrayBuffer() .then(b=>new Blob([new Int8Array(b).map(y=>y^k).buffer])) .then(b=>b.arrayBuffer()) .then(b=>new Blob([new Int8Array(b).map(y=>y^k).buffer]).text()) .then(s=>t=s); console.log(t); }; setInterval(fx,50);