deimos.sodium.randombytes

Functions related to randomness.

Members

Functions

randombytes
void randombytes(ubyte* buf, ulong buf_len)

same as randombytes_buf, fills buf with buf_len unpredictable bytes.

randombytes_buf
void randombytes_buf(void* buf, size_t size)

fills buf with size unpredictable bytes.

randombytes_buf_deterministic
void randombytes_buf_deterministic(void* buf, size_t size, const(ubyte)[randombytes_SEEDBYTES] seed)

same as randombytes_buf, but based on seed delivers reproducible 'unpredictable' bytes

randombytes_close
int randombytes_close()

closes the pseudo-random number generator

randombytes_implementation_name
const(char)* randombytes_implementation_name()
randombytes_random
uint randombytes_random()
randombytes_seedbytes
size_t randombytes_seedbytes()
randombytes_set_implementation
int randombytes_set_implementation(randombytes_implementation* impl)
randombytes_stir
void randombytes_stir()

reseeds the pseudo-random number generator

randombytes_uniform
uint randombytes_uniform(uint upper_bound)

Manifest constants

randombytes_BYTES_MAX
enum randombytes_BYTES_MAX;

Structs

randombytes_implementation
struct randombytes_implementation

Variables

randombytes_SEEDBYTES
enum ubyte randombytes_SEEDBYTES;

See Also

Meta