RAND_CLEANUP(3SSL)
β¨ RAND_CLEANUP β¨
okay so bestie, welcome to RAND_cleanup from the 3SSL manual π this one's a lil historical artifact, a fossil, a vibe from a time before you were even compiling things. It lives in <openssl/rand.h> and its whole personality is "erase the PRNG state". Buckle up π
πΈ NAME πΈ
RAND_cleanup β erase the PRNG state π
π¦ SYNOPSIS π¦
#include <openssl/rand.h>
The following function has been deprecated since OpenSSL 1.1.0, and can be hidden entirely by defining OPENSSL_API_COMPAT with a suitable version value, see openssl_user_macros(7):
void RAND_cleanup(void);
π DESCRIPTION π
ngl, this is a story of a glow-up and then a retirement. β¨
Prior to OpenSSL 1.1.0, RAND_cleanup() released all resources used by the PRNG. Like, it actually did stuff. It was booked and busy.
As of version 1.1.0, it does nothing and should not be called, since no explicit initialisation or de-initialisation is necessary. It's giving ghost π» it's technically there but it's not doing a single thing. See OPENSSL_init_crypto(3).
π«Ά bestie note: do not call it. Not because it'll hurt you, but because it's literally doing nothing and you have better things to do with your main character energy.
β RETURN VALUES β
RAND_cleanup() returns no value. Not zero, not a status, not a lil guy β nothing. It's a void function, so there's nothing to check, nothing to catch, no vibes to read. π
π SEE ALSO π
RAND(7)π
π HISTORY π
RAND_cleanup() was deprecated in OpenSSL 1.1.0; do not use it. See OPENSSL_init_crypto(3). Periodt. π
π COPYRIGHT π
Copyright 2000-2020 The OpenSSL Project Authors. All Rights Reserved.
Licensed under the Apache License 2.0 (the "License"). You may not use this file except in compliance with the License. You can obtain a copy in the file LICENSE in the source distribution or at <https://www.openssl.org/source/license.html>.
and that's the whole page bestie π this was RAND_CLEANUP(3SSL) from OpenSSL version 4.0.3, dated 2026-09-29 β tysm for reading, now go initialise your crypto implicitly like it's 1.1.0 and later π§πβ¨
π¦ where this page comes from
- ubuntu stonking: libssl-doc 4.0.3-1ubuntu1 Β· Apache-2.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms