25 #ifndef BR_BEARSSL_RAND_H__    26 #define BR_BEARSSL_RAND_H__   161         void (*
init)(
const br_prng_class **ctx, 
const void *params,
   162                 const void *seed, 
size_t seed_len);
   174         void (*
generate)(
const br_prng_class **ctx, 
void *out, 
size_t len);
   186         void (*
update)(
const br_prng_class **ctx,
   187                 const void *seed, 
size_t seed_len);
   203 #ifndef BR_DOXYGEN_IGNORE   206         const br_hash_class *digest_class;
   238         const br_hash_class *digest_class, 
const void *seed, 
size_t seed_len);
   267         const void *seed, 
size_t seed_len);
   279 static inline const br_hash_class *
   282         return ctx->digest_class;
   333 #ifndef BR_DOXYGEN_IGNORE   363         const br_block_ctr_class *aesctr, 
const void *seed, 
size_t seed_len);
   376         void *out, 
size_t len);
   391         const void *seed, 
size_t seed_len);
 void br_hmac_drbg_init(br_hmac_drbg_context *ctx, const br_hash_class *digest_class, const void *seed, size_t seed_len)
HMAC_DRBG initialisation. 
 
const br_prng_class * vtable
Pointer to the vtable. 
Definition: bearssl_rand.h:332
 
Context for AESCTR_DRBG. 
Definition: bearssl_rand.h:326
 
void br_aesctr_drbg_generate(br_aesctr_drbg_context *ctx, void *out, size_t len)
Random bytes generation with AESCTR_DRBG. 
 
const br_prng_class * vtable
Pointer to the vtable. 
Definition: bearssl_rand.h:202
 
Class type for PRNG implementations. 
Definition: bearssl_rand.h:135
 
int(* br_prng_seeder)(const br_prng_class **ctx)
Type for a provider of entropy seeds. 
Definition: bearssl_rand.h:301
 
void br_aesctr_drbg_init(br_aesctr_drbg_context *ctx, const br_block_ctr_class *aesctr, const void *seed, size_t seed_len)
AESCTR_DRBG initialisation. 
 
void br_hmac_drbg_update(br_hmac_drbg_context *ctx, const void *seed, size_t seed_len)
Inject additional seed bytes in HMAC_DRBG. 
 
Aggregate structure large enough to be used as context for subkeys (CTR encryption and decryption) fo...
Definition: bearssl_block.h:2186
 
void(* update)(const br_prng_class **ctx, const void *seed, size_t seed_len)
Inject additional seed bytes. 
Definition: bearssl_rand.h:186
 
Context for HMAC_DRBG. 
Definition: bearssl_rand.h:196
 
void br_hmac_drbg_generate(br_hmac_drbg_context *ctx, void *out, size_t len)
Random bytes generation with HMAC_DRBG. 
 
br_prng_seeder br_prng_seeder_system(const char **name)
Get a seeder backed by the operating system or hardware. 
 
size_t context_size
Size (in bytes) of the context structure appropriate for running this PRNG. 
Definition: bearssl_rand.h:140
 
const br_prng_class br_hmac_drbg_vtable
Statically allocated, constant vtable for HMAC_DRBG. 
 
void br_aesctr_drbg_update(br_aesctr_drbg_context *ctx, const void *seed, size_t seed_len)
Inject additional seed bytes in AESCTR_DRBG. 
 
static const br_hash_class * br_hmac_drbg_get_hash(const br_hmac_drbg_context *ctx)
Get the hash function implementation used by a given instance of HMAC_DRBG. 
Definition: bearssl_rand.h:280
 
const br_prng_class br_aesctr_drbg_vtable
Statically allocated, constant vtable for AESCTR_DRBG. 
 
void(* init)(const br_prng_class **ctx, const void *params, const void *seed, size_t seed_len)
Initialisation method. 
Definition: bearssl_rand.h:161
 
void(* generate)(const br_prng_class **ctx, void *out, size_t len)
Random bytes generation. 
Definition: bearssl_rand.h:174