Go to the documentation of this file.
35 *buf++ = rand() & 0xFF;
47 contiki_prng_impl(
unsigned char *buf,
size_t len) {
48 unsigned short v = random_rand();
49 while (len >
sizeof(v)) {
50 memcpy(buf, &v,
sizeof(v));
59 #define prng(Buf,Length) contiki_prng_impl((Buf), (Length))
60 #define prng_init(Value) random_init((unsigned short)(Value))
69 #define prng(Buf,Length) coap_prng_impl((Buf), (Length))
79 #define prng_init(Value) srand((unsigned long)(Value))