RAND_set_DRBG_type

Configure the primary DRBG algorithm type for a library context.

Synopsis

Declared in <openssl/rand.h>

int
RAND_set_DRBG_type(
    OSSL_LIB_CTX* ctx,
    char const* drbg,
    char const* propq,
    char const* cipher,
    char const* digest);

Description

Must be called before the DRBGs are first instantiated for ctx.

Return Value

1 on success, or 0 on error.

Parameters

NameDescription
ctxLibrary context whose RNG is configured, or NULL for the default.
drbgDRBG algorithm name (for example "HASH-DRBG" or "CTR-DRBG"), or NULL for the default.
propqProperty query for fetching the DRBG, or NULL.
cipherCipher name required by CTR-DRBG, or NULL when unused.
digestDigest name required by HASH-DRBG/HMAC-DRBG, or NULL when unused.