MCPcopy Create free account
hub / github.com/TQZHR/grok2api / xorCipher

Function xorCipher

app/static/common/admin-auth.js:25–31  ·  view source on GitHub ↗
(bytes, keyBytes)

Source from the content-addressed store, hash-verified

23}
24
25function xorCipher(bytes, keyBytes) {
26 const out = new Uint8Array(bytes.length);
27 for (let i = 0; i < bytes.length; i++) {
28 out[i] = bytes[i] ^ keyBytes[i % keyBytes.length];
29 }
30 return out;
31}
32
33function xorEncrypt(plain) {
34 const data = textEncoder.encode(plain);

Callers 2

xorEncryptFunction · 0.85
xorDecryptFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected