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));
60 #define prng(Buf,Length) contiki_prng_impl((Buf), (Length))
61 #define prng_init(Value) random_init((unsigned short)(Value))
70 #define prng(Buf,Length) coap_prng_impl((Buf), (Length))
80 #define prng_init(Value) srand((unsigned long)(Value))