Crate bc_rand

source ·
Expand description

Blockchain Commons Random Number Utilities

bc-rand exposes a uniform API for the random number primitives used in higher-level Blockchain Commons projects, including a cryptographically strong random number generator SecureRandomNumberGenerator and a deterministic random number generator SeededRandomNumberGenerator.

These primitive random number generators implement the RandomNumberGenerator trait to produce random numbers compatible with the RandomNumberGenerator Swift protocol used in MacOS and iOS, which is important when using the deterministic random number generator for cross-platform testing.

The crate also includes several convenience functions for generating secure and deterministic random numbers.

Structs

Traits

Functions