#include <openssl/ctrdrbg.h>
#include <assert.h>
#include <openssl/mem.h>
#include "internal.h"
#include "../cipher/internal.h"
#include "../service_indicator/internal.h"
static const uint64_t kMaxReseedCount = …1) << 48;
CTR_DRBG_STATE *CTR_DRBG_new(const uint8_t entropy[CTR_DRBG_ENTROPY_LEN],
const uint8_t *personalization,
size_t personalization_len) { … }
void CTR_DRBG_free(CTR_DRBG_STATE *state) { … }
int CTR_DRBG_init(CTR_DRBG_STATE *drbg,
const uint8_t entropy[CTR_DRBG_ENTROPY_LEN],
const uint8_t *personalization, size_t personalization_len) { … }
static_assert;
static void ctr32_add(CTR_DRBG_STATE *drbg, uint32_t n) { … }
static int ctr_drbg_update(CTR_DRBG_STATE *drbg, const uint8_t *data,
size_t data_len) { … }
int CTR_DRBG_reseed(CTR_DRBG_STATE *drbg,
const uint8_t entropy[CTR_DRBG_ENTROPY_LEN],
const uint8_t *additional_data,
size_t additional_data_len) { … }
int CTR_DRBG_generate(CTR_DRBG_STATE *drbg, uint8_t *out, size_t out_len,
const uint8_t *additional_data,
size_t additional_data_len) { … }
void CTR_DRBG_clear(CTR_DRBG_STATE *drbg) { … }