View Source CtrDrbg (ctr_drbg v0.1.1)
Pure Elixir implementation of the CTR_DRBG PRNG algorithm.
Examples
iex> state = CtrDrbg.init(:crypto.strong_rand_bytes(16))
iex> {state, random_bytes} = CtrDrbg.generate(state, 32)
{#CtrDrbg<...>, <<...>>}
Summary
Functions
Generate an arbitrary number of random bytes.
Initialize and seed the generator.
Reseed the generator.
Types
@opaque t()
The current PRNG state.
Functions
@spec generate(t(), pos_integer(), binary()) :: {t(), binary()}
Generate an arbitrary number of random bytes.
Initialize and seed the generator.
Reseed the generator.