RAND_ADD(3) | Library Functions Manual | RAND_ADD(3)

# NAME

`RAND_add`, `RAND_cleanup`, `RAND_poll`, `RAND_seed`, `RAND_status` — manipulate the PRNG state

# SYNOPSIS

library “libcrypto”
`#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);

# DESCRIPTION

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.

June 8, 2025 | Debian