libressl-RAND_add(3)

libressl-RAND_add3

Manipulate the prng state

Usage

Crypto Library (libcrypto, -lcrypto)

#include <openssl/rand.h>

void

RAND_add(const void *buf, int num, double entropy);

void

RAND_cleanup(void);

int

RAND_poll(void);

void

RAND_seed(const void *buf, int num);

int

RAND_status(void);

Overview

These functions used to allow for the state of the random number generator to be controlled by external sources.

They are kept for ABI compatibility but are no longer functional, and should not be used in new programs.

Return values

RAND_poll() and RAND_status() always return 1.

History

RAND_cleanup() and RAND_seed() first appeared in SSLeay 0.5.1 and have been available since OpenBSD 2.4.

RAND_add() and RAND_status() first appeared in OpenSSL 0.9.5 and have been available since OpenBSD 2.7.

RAND_poll() first appeared in OpenSSL 0.9.6 and has been available since OpenBSD 2.9.

From libressl 4.4.0-1 in Arch Linux 2026-11-01. Parsed by carta from the page's mdoc source.