RAND_CLEANUP(3ossl)

πŸ“¦ version 3.5.0, in opensuse-leap 16.0

πŸ’– NAME πŸ’–

okay so bestie, this page is all about RAND_cleanup β€” and honestly? its whole personality is erase the PRNG state. that's the vibe. that's the job. well… it was the job. keep reading, it's giving character development 😭

(this one lives in the OpenSSL manual, section 3ossl, iykyk πŸ¦‹)


✨ SYNOPSIS ✨

first things first, you gotta pull in the header:

#include <openssl/rand.h>

okay so here's the tea πŸ«– β€” the following function has been deprecated since OpenSSL 1.1.0, and you can hide it entirely by defining OPENSSL_API_COMPAT with a suitable version value. want the deets on that? see openssl_user_macros(7). slay.

void RAND_cleanup(void);

that's it. that's the whole signature. no args, no return, no drama πŸ’…


🌸 DESCRIPTION 🌸

so back in the day β€” and by "the day" i mean prior to OpenSSL 1.1.0 β€” RAND_cleanup() actually did stuff: it released all resources used by the PRNG. iconic behavior honestly πŸ‘‘

but as of version 1.1.0? it does nothing and should not be called, because no explicit initialisation or de-initialisation is necessary anymore. like, it's literally unemployed and living its best life. so don't call it, bestie, there's nothing there 🫢

if you actually wanna know how init works now, see OPENSSL_init_crypto(3). that's the main character now ✨


πŸŽ€ RETURN VALUES πŸŽ€

RAND_cleanup() returns no value. nothing. zero. void. it's giving minimalist πŸ’€


πŸ¦‹ SEE ALSO πŸ¦‹

go read that one next, i'm obsessed 🌈


πŸ’œ HISTORY πŸ’œ

RAND_cleanup() was deprecated in OpenSSL 1.1.0; do not use it. fr fr, we're so serious. see OPENSSL_init_crypto(3) instead 🧚


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.


okay that's the whole page, you ate that πŸ’… this was OpenSSL 3.5.0, dated 2026-09-25, and yes the page is literally called RAND_CLEANUP(3ossl) β€” mwah, bye bestie! πŸ“πŸ’–

πŸ“¦ where this page comes from