AquilaOS documentation
How it works, and its code
Loading...
Searching...
No Matches
random.h
Go to the documentation of this file.
1#ifndef _DEV_RANDOM_H
2#define _DEV_RANDOM_H
3
4#include <core/system.h>
5
6/* The kernel's random numbers (dev/mem/random.c). */
7
8/* Fills `buf` with random bytes (getrandom(), /dev/random and
9 * /dev/urandom). */
10void random_get(void *buf, size_t len);
11
12/* Stirs something unpredictable into the pool: the cycle counter on each
13 * timer tick, or what is written to /dev/random. */
14void random_add(uint32_t value);
15
16#endif /* ! _DEV_RANDOM_H */
void random_add(uint32_t value)
Stirs a value into the pool, which goes into the next key.
Definition random.c:68
void random_get(void *_buf, size_t len)
Fills a buffer with random bytes.
Definition random.c:93
unsigned int uint32_t
Definition stddef.h:22