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:


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