Replace Math.random with crypto.getRandomValues for _system_number

This commit is contained in:
Damian Tarnawski
2023-10-27 12:06:35 +02:00
parent 8b2f62000a
commit 49da19e013
3 changed files with 6 additions and 5 deletions
-1
View File
@@ -1350,7 +1350,6 @@ function odinSetupDefaultImports(wasmMemoryInterface, consoleElement) {
exp: Math.exp,
ldexp: (x, exp) => x * Math.pow(2, exp),
rand: Math.random,
rand_bytes: (ptr, len) => {
const view = new Uint8Array(wasmMemoryInterface.memory.buffer, ptr, len)
crypto.getRandomValues(view)