Expand description
Module containing methods for accessing or configuring the libcoap PRNG.
This module provides basic functions to seed the libcoap PRNG and retrieve random bytes from it.
Additionally, if the rand
feature is enabled, this module contains integrations with the
rand crate that allow using the libcoap PRNG as a rand::Rng or setting the libcoap PRNG to
an existing rand::Rng.
Structs§
- CoapRng
- Implementation of the rand::RngCore trait based on libcoap’s PRNG.
Functions§
- coap_
prng_ try_ fill - Attempts to fill
dest
with random bytes using libcoap’s PRNG. - seed_
coap_ prng - Seeds the default PRNG of libcoap with the provided seed.
- set_
coap_ prng - Configures libcoap to use the provided
rng
for pseudo-random number generation instead of its default PRNG.