exportfunctionrandomBytes(length) {
// not the most secure but has to do for an env// without crypto.getRandomValuesconst bytes = newUint8Array(length);
for (let i = 0; i < length; i++) {
bytes[i] = Math.floor(Math.random() * 256) % 256;
}
return bytes;
}