mirror of
https://github.com/duckietm/Nitro-V3.git
synced 2026-06-19 15:06:20 +00:00
14 lines
330 B
JavaScript
14 lines
330 B
JavaScript
const KEY = new TextEncoder().encode('slogga-dist-assets-2026');
|
|
|
|
export const encodeBytes = bytes =>
|
|
{
|
|
const output = new Uint8Array(bytes.length);
|
|
|
|
for(let index = 0; index < bytes.length; index++)
|
|
{
|
|
output[index] = bytes[index] ^ KEY[index % KEY.length] ^ ((index * 31) & 255);
|
|
}
|
|
|
|
return output;
|
|
};
|