Crate possiblyrandom

Source
Expand description

getrandom provides access to OS randomness, but will fail to compile on platforms that do not support fetching OS randomness. This is exactly what you want when you’re doing cryptographic operations, but when you’re just opportunistically randomizing, we’re fine with compiling and simply disabling randomization.

This crate does that, returning only possibly-random data.

Note that this crate only enables getrandom on a subset of platforms it supports. As getrandom evolves this crate is unlikely to carefully track all getrandom-supported platforms, however will use random data on popular platforms.

Functions§

getpossiblyrandom
Possibly fills dest with random data. May fill it with zeros.