gnutls_cipher_decrypt(3)

πŸ’– gnutls_cipher_decrypt β€” bestie's guide to un-scrambling ur secrets πŸ’–

okay so real talk, this one lives in the gnutls manual (yes the whole gnutls crew, we love them) and it's literally an API function. it's giving "quiet but essential." main character energy but in lowercase. let's get into it 🫢


✨ NAME ✨

gnutls_cipher_decrypt β€” API function

like. that's the whole name. she's simple, she's iconic. πŸ’…


🌸 SYNOPSIS 🌸

#include <gnutls/crypto.h>

int gnutls_cipher_decrypt(gnutls_cipher_hd_t handle, void * ctext,
       size_t ctext_len);

no cap, that's the whole entrance. include the header, call the function, boom. ✨


πŸŽ€ ARGUMENTS πŸŽ€

  • gnutls_cipher_hd_t handle β€” bestie this is a gnutls_cipher_hd_t type. that's it. that's the whole job description. it's the handle, the vibe-holder, the one who knows the algorithm. πŸ”‘
  • void * ctext β€” the data to decrypt. the locked-up little secret u want back in plain form. πŸ™ˆ
  • size_t ctext_len β€” the length of data to decrypt. yes girl, u gotta tell her how much. she's not gonna guess. 😭

πŸ’œ DESCRIPTION πŸ’œ

so what does she actually do?? this function will decrypt the given data using the algorithm specified by the context. the handle already knows the algorithm, u just hand her the scrambled bytes and she hands back the readable ones. slay. πŸ”₯

⚠️ IMPORTANT CAVEAT, DO NOT SKIP THIS ONE BESTIE ⚠️ note that in AEAD ciphers, this will not check the tag. like. it literally will not. it's not being lazy, it's just not her job. u will need to compare the tag sent with the value returned from gnutls_cipher_tag(). so like. don't just trust the output and move on. that's how u get got. do the tag comparison. periodt. πŸ’€

⭐ RETURNS ⭐

zero, or a negative error code on error.

so: 0 = we ate. negative = something went sideways, check it. fr fr. 🌈


πŸ¦‹ SINCE πŸ¦‹

2.10.0

she's been here since 2.10.0. a veteran. a legend. show some respect. πŸ‘‘


πŸ™ˆ REPORTING BUGS πŸ™ˆ

found a bug? not the vibe, but okay, tell the devs:

they want to know. they're not mad. they just want her to be perfect. πŸ’–


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.

(tl;dr: share her, remix her, just keep the receipts. it's giving generous. it's giving open source royalty. ✨)


🌟 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/

go read the whole thing, bestie. she's got lore. πŸ“šπŸ¦‹


and that's the whole page!! no skips, no shortcuts, every detail accounted for πŸ’–

so yeah β€” this page is straight out of the gnutls 3.8.13 manual, the gnutls_cipher_decrypt(3) era, and honestly?? she ate. go decrypt responsibly, check ur tags, and stay iconic. mwah. πŸ’‹πŸŽ€βœ¨

πŸ“¦ where this page comes from