RAND_LOAD_FILE(3)
π RAND_LOAD_FILE(3) β PRNG seed file π
hiii bestie π welcome to the RAND_LOAD_FILE(3) page from the Library Functions Manual β we're talking PRNG seed files and it's giving old-school crypto lore β¨
πΈ NAME πΈ
RAND_file_name, RAND_load_file, RAND_write_file β PRNG seed file πΎπ¦
β¨ SYNOPSIS β¨
okay so this is the whole little lineup, bestie π
library βlibcryptoβ #include <openssl/rand.h>
const char *
RAND_file_name(char *buf, size_t num);
int
RAND_load_file(const char *filename, long max_bytes);
int
RAND_write_file(const char *filename);
π DESCRIPTION π
RAND_file_name()β returns a default path for the random seed file π.bufpoints to a buffer of sizenumwhere the filename gets stored. Ifnumis too small for the path name, an error occurs π.RAND_load_file()β used to allow for the state of the random number generator to be controlled by external sources π. It is kept for ABI compatibility but is no longer functional, and should not be used in new programs π«.
bestie, fr fr: RAND_load_file() is basically a legacy icon that no longer does the thing. do not build new stuff on it π
RAND_write_file()β writes a number of random bytes (currently1024) to filefilenameπβ¨.
π RETURN VALUES π
RAND_load_file()β returnsmax_bytes, or a bogus positive value ifmax_bytesis-1ππ.RAND_write_file()β returns the number of bytes written, or a number less than or equal to1if an error occurs π.RAND_file_name()β returns a pointer tobufon success orNULLon error πΈ.
π§ HISTORY π§
RAND_load_file(), RAND_write_file(), and RAND_file_name() first appeared in SSLeay 0.5.1 and have been available since OpenBSD 2.4 πβ.
mwah π this cutie came from Debian, dated June 8, 2025, and its footer tag is RAND_LOAD_FILE(3) π«Άπ
π¦ where this page comes from
- alpine 3.24: libressl-doc 4.3.1-r0 Β· custom
- arch rolling: libressl 4.4.0-1 Β· ISC AND custom:OpenSSL
- Copyright (c) 2000, 2001 The OpenSSL Project. All rights reserved
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms