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

Name

Description

ctx

Library context whose private RNG is replaced, or NULL for the default.

rand

RAND context that becomes the private generator used by RAND_priv_bytes(); ctx takes ownership.

Created with MrDocs