gnutls_encode_rs_value(3)

✨ gnutls_encode_rs_value ✨

okay so bestie, we're deep in the gnutls manual (that's the GNU TLS library, she's iconic, she's everywhere) and today's main character is gnutls_encode_rs_value β€” an API function, no cap. let's get into it πŸ’…


🌸 SYNOPSIS 🌸

#include <gnutls/crypto.h>

int gnutls_encode_rs_value(gnutls_datum_t * sig_value, const
       gnutls_datum_t * r, const gnutls_datum_t * s);

πŸŽ€ ARGUMENTS πŸŽ€

  • gnutls_datum_t * sig_value β€” this one's the lil container that will hold a Dss-Sig-Value DER encoded structure. she's the output girlie, she gets filled in 🫢
  • const gnutls_datum_t * r β€” must contain the r value. like, it HAS to, that's the whole vibe πŸ”₯
  • const gnutls_datum_t * s β€” must contain the s value. same energy, different letter πŸ’–

πŸ¦‹ DESCRIPTION πŸ¦‹

so what does she DO? this function will encode the r and s values you hand her into a Dss-Sig-Value structure β€” which is the format used for DSA and ECDSA signatures. it's giving "put the two halves together so the rest of the world can read them" πŸ’«

heads up bestie: the output value should be deallocated using gnutls_free(). do NOT forget, or that memory is gonna linger like an ex who won't stop watching your stories 😭

⭐ RETURNS ⭐

on success, GNUTLS_E_SUCCESS (0) is returned β€” slay πŸŽ‰

otherwise? an error code comes back. not slay, but informative πŸ’€


🌈 SINCE 🌈

3.6.0 β€” she's been around, she's a veteran, respect her πŸ‘‘


πŸ’œ REPORTING BUGS πŸ’œ

found a bug? don't gatekeep, report it to <bugs@gnutls.org> πŸ“©

home page: https://www.gnutls.org β€” go say hi, she doesn't bite 🌸


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. fr fr, that's the whole deal, and it's honestly so generous of them πŸ’–


🧚 SEE ALSO 🧚

the full documentation for gnutls is maintained as a Texinfo manual. so if the /usr/share/doc/gnutls/ directory does NOT contain the HTML form, just go visit:

https://www.gnutls.org/manual/

iykyk πŸ“–βœ¨


and that's the whole page, bestie 🫢 this lil legend is from the gnutls manual, version 3.8.13, and the page is gnutls_encode_rs_value(3). go forth and encode responsibly πŸ’…πŸŽ€

πŸ“¦ where this page comes from