bjorn3 / browser_wasi_shim

A WASI shim for in the browser
Apache License 2.0
299 stars 40 forks source link

Modify random_get to use crypto.getRandomValues #75

Closed Aandreba closed 4 months ago

Aandreba commented 4 months ago

I simply modified the random_get implementation to use crypto.getRandomValues to generate the random numbers. This has the benefit that the RNG is cryptographically secure, and is probably faster that the previous implementation (though that should be benchmarked).

bjorn3 commented 4 months ago

Thanks!