RAND_set0_public

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

Synopsis

Declared in <openssl/rand.h>

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

Return Value

1 on success, or 0 on failure.

Parameters

NameDescription
ctxLibrary context whose public RNG is replaced, or NULL for the default.
randRAND context that becomes the public generator; ctx takes ownership.