RAND_CLEANUP(3ossl)
π 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 π
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
- opensuse-leap 16.0: openssl-3-doc 3.5.0-160000.11.1 Β· Apache-2.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms