RAND_pseudo_bytes

Fill a buffer with bytes that need not be cryptographically strong (deprecated).

Synopsis

Declared in <openssl/rand.h>

[[deprecated]]
int
RAND_pseudo_bytes(
    unsigned char* buf,
    int num);

WARNING

Deprecated. Use of this entity is allowed but discouraged.

Description

Prefer RAND_bytes() for all new code.

Return Value

1 if the bytes are cryptographically strong, 0 if only pseudo-random, or -1 on error.

Parameters

NameDescription
bufDestination buffer to fill.
numNumber of bytes to write.