EVP_RAND_instantiate

Instantiate (seed) an EVP_RAND_CTX so it can generate random bytes.

Synopsis

Declared in <openssl/evp.h>

int
EVP_RAND_instantiate(
    EVP_RAND_CTX* ctx,
    unsigned int strength,
    int prediction_resistance,
    unsigned char const* pstr,
    size_t pstr_len,
    OSSL_PARAM const params[]);

Return Value

1 on success, or 0 on error.

Parameters

NameDescription
ctxRNG context to instantiate.
strengthRequested security strength in bits.
prediction_resistanceNon-zero to force a reseed from live entropy.
pstrOptional personalization string, or NULL.
pstr_lenLength of pstr in bytes.
paramsOptional OSSL_PARAM array of additional parameters, or NULL.