Loading...
Searching...
No Matches
coap_prng.c File Reference

Pseudo Random Number functions. More...

`#include "coap3/coap_libcoap_build.h"`
`#include <stdlib.h>`
Include dependency graph for coap_prng.c:

Go to the source code of this file.

## Functions

COAP_API void | coap_prng_init (unsigned int seed)
| Seeds the default random number generation function with the given `seed`.
COAP_API int | coap_prng (void *buf, size_t len)
| Fills `buf` with `len` random bytes using the default pseudo random number generator.
static int | coap_prng_default (void *buf, size_t len)
void | coap_set_prng (coap_rand_func_t rng)
| Replaces the current random number generation function with the default function `rng`.
void | coap_prng_init_lkd (unsigned int seed)
| Seeds the default random number generation function with the given `seed`.
int | coap_prng_lkd (void *buf, size_t len)
| Fills `buf` with `len` random bytes using the default pseudo random number generator.

## Variables

static coap_rand_func_t | rand_func = coap_prng_default

## Detailed Description

Pseudo Random Number functions.

Definition in file coap_prng.c.

## Function Documentation

## coap_prng_default()

int coap_prng_default | ( | void * | buf,
|  | size_t | len )

static

Definition at line 105 of file coap_prng.c.

## Variable Documentation

## rand_func

coap_rand_func_t rand_func = coap_prng_default

static

Definition at line 158 of file coap_prng.c.