PatchworkOS
Loading...
Searching...
No Matches
rand.h File Reference
#include <stdbool.h>
#include <stdint.h>

Go to the source code of this file.

Data Structures

struct  rand_cpu_ctx_t
 CPU random number generator context. More...
 

Functions

void rand_cpu_init (rand_cpu_ctx_t *ctx)
 Initializes the random number generator.
 
uint64_t rand_gen (void *buffer, uint64_t size)
 Fills a buffer with random bytes.
 
uint64_t rdrand_do (uint32_t *value, uint8_t retries)
 Generates a random 32-bit unsigned integer using the RDRAND instruction.