gsasl_randomize(3)

πŸ“¦ version 1.10.0, in ubuntu jammy

✨ gsasl_randomize ✨

okay bestie, welcome to the gsasl manual β€” yes, that's the manual name, it's giving very "the whole library lives here" πŸ’–. This page is about one specific function: gsasl_randomize. Let's get into it 🫢


🌸 NAME 🌸

gsasl_randomize β€” it's an API function, periodt πŸ’…


πŸŽ€ SYNOPSIS πŸŽ€

#include <gsasl.h>

int gsasl_randomize(int strong, char * data, size_t datalen);

πŸ¦‹ ARGUMENTS πŸ¦‹

  • int strong β€” lowkey the vibe switch: it's 0 iff the operation should not block, and non-0 if you want very strong randomness ✨. (Yes, "iff" β€” math girlies stay winning.)
  • char * data β€” the output array that gets filled with random data. She's the vessel, she's the main character πŸŽ€
  • size_t datalen β€” the size of that output array. Gotta tell her how much room she's working with, fr fr πŸ“

πŸ’œ DESCRIPTION πŸ’œ

Store cryptographically random data of the given size in the buffer you handed over. That's it, that's the whole job, and she does it slayfully ✨

Return value: Returns GSASL_OK iff successful. (Not GSASL_OK? Then it wasn't successful. Iconic logic, no notes πŸ’€)


πŸ’€ DEPRECATED πŸ’€

bestie. listen. this one is deprecated. Do not build new stuff on it, I'm begging πŸ™ˆ

Use gsasl_random() or gsasl_nonce() instead. Those are the upgraded girls, the glow-up versions, the ones who ate πŸ‘‘


πŸ› REPORTING BUGS πŸ›

Found a bug? First of all, not the vibe, but also please tell someone πŸ’Œ


Copyright Β© 2002-2021 Simon Josefsson.

Copying and distribution of this file, with or without modification, are permitted in any medium without royalty provided the copyright notice and this notice are preserved. (Very generous, very demure, we love a permissive license 🫢)


🌈 SEE ALSO 🌈

The full documentation for gsasl is maintained as a Texinfo manual. If the info and gsasl programs are properly installed at your site, this command:

info gsasl

should give you access to the complete manual. Obsessed with that, honestly 🧚

As an alternative you may obtain the manual from:

http://www.gnu.org/software/gsasl/manual/

okay that's the whole page!! this was gsasl version 1.10.0, page gsasl_randomize(3), and yes she's a little vintage but she still serves πŸ’… bye bestie, go generate some cryptographically random data responsibly πŸ’–βœ¨πŸŽ€

πŸ“¦ where this page comes from