AquilaOS documentation
How it works, and its code
Toggle main menu visibility
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). */
10
void
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. */
14
void
random_add
(
uint32_t
value);
15
16
#endif
/* ! _DEV_RANDOM_H */
system.h
random_add
void random_add(uint32_t value)
Stirs a value into the pool, which goes into the next key.
Definition
random.c:68
random_get
void random_get(void *_buf, size_t len)
Fills a buffer with random bytes.
Definition
random.c:93
uint32_t
unsigned int uint32_t
Definition
stddef.h:22
kernel
include
dev
random.h
Generated by
1.18.0