libcoap  4.0.3
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros | Functions
Pseudo Random Numbers

Macros

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

Functions

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

Detailed Description

Macro Definition Documentation

#define prng (   Buf,
  Length 
)

Fills Buf with Length bytes of random data.

Definition at line 69 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 79 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.