[#RAND_pseudo_bytes]
= RAND&lowbar;pseudo&lowbar;bytes
:mrdocs:

Fill a buffer with bytes that need not be cryptographically strong (deprecated)&period;

== Synopsis

Declared in `&lt;openssl&sol;rand&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
&lsqb;&lsqb;deprecated&rsqb;&rsqb;
int
RAND&lowbar;pseudo&lowbar;bytes(
    unsigned char* buf,
    int num);
----

[WARNING]
====
https://en.cppreference.com/cpp/language/attributes/deprecated[Deprecated^]. Use of this entity is allowed but discouraged.
====
== Description

Prefer RAND&lowbar;bytes() for all new code&period;

== Return Value

1 if the bytes are cryptographically strong, 0 if only pseudo&hyphen;random, or &hyphen;1 on error&period;

== Parameters

[cols="1,4"]
|===
| Name| Description
| *buf*
| Destination buffer to fill&period;
| *num*
| Number of bytes to write&period;
|===


[.small]#Created with https://www.mrdocs.com[MrDocs]#
