gnutls_privkey_decrypt_data(3)

πŸ’– gnutls_privkey_decrypt_data(3) πŸ’–

okay bestie, sit down, hydrate, and let me tell you about a little function from the gnutls manual that is genuinely so useful. no cap. 🫢


✨ NAME ✨

gnutls_privkey_decrypt_data β€” it's an API function, and it does exactly what the name says it does, which honestly? iconic behaviour. πŸ’…


🌸 SYNOPSIS 🌸

#include <gnutls/abstract.h>

int gnutls_privkey_decrypt_data(gnutls_privkey_t key, unsigned int
flags, const gnutls_datum_t * ciphertext, gnutls_datum_t * plaintext);

like. look at her. she's perfect. πŸŽ€


πŸ¦‹ ARGUMENTS πŸ¦‹

  • gnutls_privkey_t key β€” bestie this is the key, it holds the key, the key lives here, this is the key's whole thing πŸ’œ
  • unsigned int flags β€” zero for now. that's it. that's the whole vibe. zero. 🫠
  • const gnutls_datum_t * ciphertext β€” the data that needs decrypting, she's holding it, she's the locked box πŸ”’
  • gnutls_datum_t * plaintext β€” this is where the decrypted data ends up, and heads up: it gets allocated with gnutls_malloc(). so like. that's yours to free later, don't forget, i'm serious πŸ™ˆ

🌈 DESCRIPTION 🌈

so basically, this function decrypts the given data using the algorithm that your private key supports. that's the whole thing. your key knows what it's doing, it just handles it. main character energy, honestly. πŸ‘‘


⭐ RETURNS ⭐

if everything goes off without a hitch, you get GNUTLS_E_SUCCESS (which is 0). and if not? negative error value, babes. negative. 😭


πŸŽ€ SINCE πŸŽ€

2.12.0 β€” she's been around for a minute, she's got history, she's a legacy icon πŸ’–


πŸ’€ REPORTING BUGS πŸ’€

found a bug? not me being the one to tell you, but like, tell them:


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.

like, copy it, share it, remix it, just keep the receipts. periodt. πŸ’…


🧚 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 tea, bestie πŸ“ this was gnutls 3.8.13, page gnutls_privkey_decrypt_data(3), served fresh with love. go decrypt something. slay. πŸ’–βœ¨πŸŒΈ

πŸ“¦ where this page comes from