gnutls_pkcs11_token_get_random(3)
π gnutls_pkcs11_token_get_random(3) π
okay bestie, sit down, hydrate, because we're about to talk about pulling literal randomness straight out of a PKCS 11 token β¨ this one lives in the gnutls manual (that's the 3 in the name, library-call vibes, iykyk) and it's genuinely such a neat little function.
β¨ NAME β¨
gnutls_pkcs11_token_get_random β API function π
πΈ SYNOPSIS πΈ
#include <gnutls/pkcs11.h>
int gnutls_pkcs11_token_get_random(const char * token_url, void *
rnddata, size_t len);
π¦ ARGUMENTS π¦
const char * token_urlβ a PKCS 11 URL that specifies a token. like, which token are we talking to, bestie? πvoid * rnddataβ a pointer to the memory area that's gonna get filled with random data πsize_t lenβ how many bytes of randomness you're asking for. the amount. the quantity. the vibe. π
π DESCRIPTION π
so this function grabs random data from the given token. no cap. it stores it in rnddata and fills the memory that rnddata points at with len random bytes straight from the token. that's the whole thing, and honestly? iconic. β¨
β RETURNS β
on success you get GNUTLS_E_SUCCESS (that's 0, the good number π«Ά). otherwise you get a negative error value, which is the universe telling you something went sideways π
π REPORTING BUGS π
found a bug? tell the gnutls girlies about it at <bugs@gnutls.org>.
home page: https://www.gnutls.org
π COPYRIGHT π
Copyright Β© 2001-2023 Free Software Foundation, Inc., and others.
copying and distributing this file β with or without modification β is permitted in any medium without royalty, as long as you keep the copyright notice and this notice. so like, go off, just leave the receipts π
π SEE ALSO π
the full documentation for gnutls lives in a Texinfo manual. if the /usr/share/doc/gnutls/ directory doesn't have the HTML form, go visit
https://www.gnutls.org/manual/
and that's the whole page, bestie!! π mwah. this was gnutls 3.8.13 talking about gnutls_pkcs11_token_get_random(3) β thanks for reading the whole thing, you're literally the main character π§β¨π
π¦ where this page comes from
- alpine 3.22: gnutls-doc 3.8.13-r0 Β· LGPL-2.1-or-later
- alpine 3.23: gnutls-doc 3.8.13-r0 Β· LGPL-2.1-or-later
- alpine 3.24: gnutls-doc 3.8.13-r0 Β· LGPL-2.1-or-later
- arch rolling: gnutls 3.8.13-3 Β· GPL-3.0-or-later AND LGPL-2.1-or-later
- fedora 43: gnutls-devel 3.8.13-1.fc43 Β· GPL-3.0-or-later AND LGPL-2.1-or-later
- fedora 43: gnutls-devel 3.8.13-1.fc43 Β· GPL-3.0-or-later AND LGPL-2.1-or-later
- fedora 44: gnutls-devel 3.8.13-1.fc44 Β· GPL-3.0-or-later AND LGPL-2.1-or-later
- fedora 44: gnutls-devel 3.8.13-1.fc44 Β· GPL-3.0-or-later AND LGPL-2.1-or-later
- ubuntu stonking: gnutls-doc 3.8.13-1ubuntu1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms