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 🌈


πŸŽ€ HISTORY πŸŽ€

RAND_cleanup() was deprecated in OpenSSL 1.1.0; do not use it. See OPENSSL_init_crypto(3). Periodt. πŸ’…


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