Pseudo Random Numbers

API functions for gerating pseudo random numbers. More...

## Macros

#define | prng(Buf, Length)
| Fills `Buf` with `Length` bytes of random data. More...
#define | prng_init(Value)
| Called to set the PRNG seed. More...

## Functions

COAP_STATIC_INLINE int | coap_prng_impl (unsigned char *buf, size_t len)
| Fills `buf` with `len` random bytes. More...

## Detailed Description

API functions for gerating pseudo random numbers.

## Macro Definition Documentation

## prng

#define prng | ( |  | Buf,
|  |  | Length
| ) |  |

Fills `Buf` with `Length` bytes of random data.

Definition at line 112 of file prng.h.

## prng_init

#define prng_init | ( |  | Value | ) |

Called to set the PRNG seed.

You may want to re-define this to allow for a better PRNG.

Definition at line 122 of file prng.h.

## Function Documentation

## coap_prng_impl()

COAP_STATIC_INLINE int coap_prng_impl | ( | unsigned char * | buf,
|  | size_t | len
| ) |  |

Fills `buf` with `len` random bytes.

This is the default implementation for prng(). You might want to change prng() to use a better PRNG on your specific platform.

Definition at line 98 of file prng.h.