libcoap  4.1.2
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

§ prng

#define prng (   Buf,
  Length 
)

Fills Buf with Length bytes of random data.

Definition at line 91 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 101 of file prng.h.

Function Documentation

§ coap_prng_impl()

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