gnutls_encode_ber_digest_info(3)
π gnutls_encode_ber_digest_info β¨
okay bestie, welcome to the gnutls manual, page gnutls_encode_ber_digest_info(3) π. this one's a lil crypto snack and it's honestly so useful, let's get into it π«Ά
πΈ NAME πΈ
gnutls_encode_ber_digest_info β an API function, and yes she's the one who turns your digest into a proper RSA PKCS1 1.5 DigestInfo situation π
β¨ SYNOPSIS β¨
#include <gnutls/crypto.h>
int gnutls_encode_ber_digest_info(gnutls_digest_algorithm_t hash, const
gnutls_datum_t * digest, gnutls_datum_t * output);
π ARGUMENTS π
gnutls_digest_algorithm_t hashβ the hash algorithm that was used to get the digest, like, which flavor of hash we're working with πconst gnutls_datum_t * digestβ must contain the digest data. it literally has to have it, no empty vibes allowed πgnutls_datum_t * outputβ will contain the allocated DigestInfo BER encoded data. she's giving allocated, she's giving BER encoded, main character energy fr fr π
π¦ DESCRIPTION π¦
so what this function does is: it takes the digest data you handed it, plus its algorithm, and encodes them both into an RSA PKCS1 1.5 DigestInfo structure. that's it, that's the whole glow-up β¨ no cap.
π RETURNS π
on success, GNUTLS_E_SUCCESS (0) is returned π otherwise an error code comes back instead, and you'll be like π but that's just how it goes.
β SINCE β
3.5.0 β she's been iconic for a minute, iykyk π
π REPORTING BUGS π
found a bug? not the vibe, tell the devs bestie:
- report bugs to <bugs@gnutls.org>.
- home page: https://www.gnutls.org
π COPYRIGHT π
Copyright Β© 2001-2023 Free Software Foundation, Inc., and others.
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 π
π SEE ALSO π
the full documentation for gnutls is maintained as a Texinfo manual. if the /usr/share/doc/gnutls/ directory does not contain the HTML form, visit
https://www.gnutls.org/manual/
and that's the page, bestie π this was gnutls version 3.8.13, page gnutls_encode_ber_digest_info(3), brought to you by the gnutls manual. slay, stay encoded, and go read the docs π§β¨
π¦ 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