gnutls_cipher_decrypt3(3)

πŸ’– gnutls_cipher_decrypt3(3) πŸ’–

okay bestie, pull up a chair, we're decoding some ciphertext and honestly? it's giving main character energy ✨ This one lives in the gnutls manual, section 3 (library functions, iykyk), and it's literally called gnutls_cipher_decrypt3 β€” the API function that takes your scrambled bytes and hands you back readable ones πŸ¦‹


✨ SYNOPSIS ✨

#include <gnutls/crypto.h>

int gnutls_cipher_decrypt3(gnutls_cipher_hd_t handle, const void *
ctext, size_t ctext_len, void * ptext, size_t * ptext_len, unsigned
flags);

πŸŽ€ ARGUMENTS πŸŽ€

  • gnutls_cipher_hd_t handle β€” it's a gnutls_cipher_hd_t type, bestie. that's your cipher handle, the whole vibe of the operation 🌸
  • const void * ctext β€” the data to decrypt. the mystery text. the locked girlie πŸ”’
  • size_t ctext_len β€” the length of data to decrypt. gotta tell it how much, no cap πŸ“
  • void * ptext β€” the decrypted data. where the good stuff lands πŸ’…
  • size_t * ptext_len β€” the available length for decrypted data. this is your budget, and yes, it can get updated, we'll get to that ⭐
  • unsigned flags β€” flags for padding. the little switches that decide how the padding situation goes down 🎁

🌈 DESCRIPTION 🌈

This function will decrypt the given data using the algorithm specified by the context. periodt. πŸ’œ

If flags is specified, padding for the decrypted data will be removed accordingly and ptext_len will be updated. so like, you hand over your buffer size, and if padding's in play, ptext_len gets rewritten with what's actually there after the padding gets yeeted πŸ™ˆ

lowkey important: ptext_len is a pointer, so it's not just reading your value β€” it can change it on you. that's the whole point, bestie 🫢

πŸ”₯ RETURNS πŸ”₯

Zero or a negative error code on error. that's it, that's the contract β€” zero means slay, negative means something went sideways πŸ’€


⏳ SINCE ⏳

3.7.7 β€” so it's been around a minute, it's not new-new, but it's not ancient either 🧚


😭 REPORTING BUGS 😭

Found a bug? Not the cute kind? Report bugs to <bugs@gnutls.org>. πŸ›

Home page: https://www.gnutls.org


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. so like, go off, just keep the receipts 🧾✨


πŸ¦‹ 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 whole page, bestie πŸ’– this was gnutls version 3.8.13, and the page itself is gnutls_cipher_decrypt3(3) β€” decrypt responsibly, keep your ptext_len close, and stay iconic πŸŒΈπŸ’…πŸŽ€

πŸ“¦ where this page comes from