Classes | Macros | Functions | Variables
rand.c File Reference
#include <openssl/rand.h>
#include <assert.h>
#include <limits.h>
#include <string.h>
#include <openssl/chacha.h>
#include <openssl/cpu.h>
#include <openssl/mem.h>
#include <openssl/type_check.h>
#include "internal.h"
#include "fork_detect.h"
#include "../../internal.h"
#include "../delocate.h"
Include dependency graph for rand.c:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  rand_thread_state
 

Macros

#define CRNGT_BLOCK_SIZE   16
 

Functions

int RAND_bytes (uint8_t *out, size_t out_len)
 
void RAND_bytes_with_additional_data (uint8_t *out, size_t out_len, const uint8_t user_additional_data[32])
 
static void rand_get_seed (struct rand_thread_state *state, uint8_t seed[CTR_DRBG_ENTROPY_LEN], int *out_used_cpu)
 
int RAND_pseudo_bytes (uint8_t *buf, size_t len)
 
static void rand_thread_state_free (void *state_in)
 
static int rdrand (uint8_t *buf, size_t len)
 

Variables

static const unsigned kReseedInterval = 4096
 

Macro Definition Documentation

◆ CRNGT_BLOCK_SIZE

#define CRNGT_BLOCK_SIZE   16

Definition at line 57 of file rand.c.

Function Documentation

◆ RAND_bytes()

int RAND_bytes ( uint8_t out,
size_t  out_len 
)

Definition at line 449 of file rand.c.

◆ RAND_bytes_with_additional_data()

void RAND_bytes_with_additional_data ( uint8_t out,
size_t  out_len,
const uint8_t  user_additional_data[32] 
)

Definition at line 302 of file rand.c.

◆ rand_get_seed()

static void rand_get_seed ( struct rand_thread_state state,
uint8_t  seed[CTR_DRBG_ENTROPY_LEN],
int out_used_cpu 
)
static

Definition at line 291 of file rand.c.

◆ RAND_pseudo_bytes()

int RAND_pseudo_bytes ( uint8_t buf,
size_t  len 
)

Definition at line 455 of file rand.c.

◆ rand_thread_state_free()

static void rand_thread_state_free ( void *  state_in)
static

Definition at line 103 of file rand.c.

◆ rdrand()

static int rdrand ( uint8_t buf,
size_t  len 
)
static

Definition at line 157 of file rand.c.

Variable Documentation

◆ kReseedInterval

const unsigned kReseedInterval = 4096
static

Definition at line 53 of file rand.c.



grpc
Author(s):
autogenerated on Fri May 16 2025 03:01:27