Type Definition bearssl::br_prng_seeder
[−]
[src]
type br_prng_seeder = Option<unsafe extern "C" fn(_: *mut *const br_prng_class) -> c_int>;
\brief Type for a provider of entropy seeds.
A "seeder" is a function that is able to obtain random values from some source and inject them as entropy seed in a PRNG. A seeder shall guarantee that the total entropy of the injected seed is large enough to seed a PRNG for purposes of cryptographic key generation (i.e. at least 128 bits).
A seeder may report a failure to obtain adequate entropy. Seeders shall endeavour to fix themselves transient errors by trying again; thus, callers may consider reported errors as permanent.
\param ctx PRNG context to seed. \return 1 on success, 0 on error.