mirror of
https://github.com/obgm/libcoap.git
synced 2026-11-03 08:25:47 +03:00
These new functions for generating pseudo numbers replace the old macro-based approach: coap_prng() replaces prng() to generate new pseudo random numbers. This function uses getrandom() if HAVE_GETRANDOM is defined at build time. coap_prng_init() replaces prng_init() to seed the pseudo random number generator. The function does nothing if HAVE_GETRANDOM is set at build time. coap_set_prng() can be used to register a custom pseudo number generation function replacing the default.