RAND_set0_private

Install rand as the private DRBG for a library context, transferring ownership.

Synopsis

Declared in <openssl/rand.h>

int
RAND_set0_private(
    OSSL_LIB_CTX* ctx,
    EVP_RAND_CTX* rand);

Return Value

1 on success, or 0 on failure.

Parameters

NameDescription
ctxLibrary context whose private RNG is replaced, or NULL for the default.
randRAND context that becomes the private generator used by RAND_priv_bytes(); ctx takes ownership.