libcoap  4.1.1
 All Data Structures Files Functions Variables Typedefs Macros Groups Pages
Macros | Functions
Pseudo Random Numbers

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

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

Detailed Description

Macro Definition Documentation

#define prng (   Buf,
  Length 
)

Fills Buf with Length bytes of random data.

Definition at line 70 of file prng.h.

#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 80 of file prng.h.

Function Documentation

static int coap_prng_impl ( unsigned char *  buf,
size_t  len 
)
inlinestatic

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 33 of file prng.h.