|
AquilaOS documentation
How it works, and its code
|
#include <core/system.h>Go to the source code of this file.
Functions | |
| void | random_get (void *buf, size_t len) |
| Fills a buffer with random bytes. | |
| void | random_add (uint32_t value) |
| Stirs a value into the pool, which goes into the next key. | |
| void random_add | ( | uint32_t | value | ) |
Stirs a value into the pool, which goes into the next key.
The timer tick adds the cycle counter on each tick.
| value | the value, which should be hard to predict |
Definition at line 68 of file random.c.
References pool, pool_i, and random_add().
Referenced by random_add(), random_stir(), randomdev_write(), and sched_timer_tick().
| void random_get | ( | void * | _buf, |
| size_t | len ) |
Fills a buffer with random bytes.
| _buf | the buffer |
| len | its size, in bytes |
Definition at line 93 of file random.c.
References chacha20_block(), memcpy(), memset(), MIN, random_get(), random_stir(), and state.
Referenced by bind_port(), random_get(), randomdev_read(), sock_bind(), sys_getrandom(), and tcp_iss().