rust-random / getrandom

A small cross-platform library for retrieving random data from (operating) system source
Apache License 2.0
264 stars 166 forks source link

Unify getentropy-based implementations #418

Closed josephlr closed 2 months ago

josephlr commented 2 months ago

This is similar to what we did for getrandom.rs, and makes switching just Solaris to getentropy easier.

josephlr commented 2 months ago

This adds 256-byte chunking for Emscripten, which, strictly speaking, is not needed, but I guess it's fine.

Ya I thought about special-casing this, but I think the fact that emscripten's getentropy works with buffers longer than 256 bytes is undocumented, so maybe it's not the best that we were depending on it.