gnutls_pubkey_encrypt_data(3)

πŸ’– gnutls_pubkey_encrypt_data β€” the gnutls manual, bestie edition πŸ’–

okay so you're deep in the gnutls manual pages (the gnutls manual, specifically) and you landed on gnutls_pubkey_encrypt_data(3). slay. let's get into it 🫢


✨ NAME ✨

gnutls_pubkey_encrypt_data β€” it's an API function, and it does exactly what it says on the tin πŸ’…


🌸 SYNOPSIS 🌸

#include <gnutls/abstract.h>

int gnutls_pubkey_encrypt_data(gnutls_pubkey_t key, unsigned int flags,
const gnutls_datum_t * plaintext, gnutls_datum_t * ciphertext);

πŸŽ€ ARGUMENTS πŸŽ€

  • gnutls_pubkey_t key β€” this one holds the public key πŸ”‘ like, it is the public key, it's the whole vibe
  • unsigned int flags β€” bestie, should be 0 for now. that's it. that's the whole story πŸ™ˆ
  • const gnutls_datum_t * plaintext β€” the data you wanna encrypt πŸ“
  • gnutls_datum_t * ciphertext β€” this is where the encrypted data ends up ✨

πŸ¦‹ DESCRIPTION πŸ¦‹

So this function will encrypt the given data, using the public key. That's the main character move of the whole page, fr fr.

On success, the ciphertext will be allocated using gnutls_malloc(). noted. that's your allocation, so act accordingly πŸ‘‘


⭐ RETURNS ⭐

On success, GNUTLS_E_SUCCESS (0) is returned πŸŽ‰ otherwise you get a negative error value 😭 (it's giving "read the error code", iykyk).


🌈 SINCE 🌈

3.0 β€” she's been iconic since 3.0, no cap πŸ’œ


πŸ’€ REPORTING BUGS πŸ’€

Found a bug? not you being the bug reporter, we love that for you 🫢 send it to:


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. periodt. that's the license, and it ate πŸ’…


🌸 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, you understood every word, I'm so proud of you πŸ₯ΉπŸ’–

this lil guide came from the gnutls manual, version 3.8.13, and it's the gnutls_pubkey_encrypt_data(3) page β€” go encrypt something cute, ily, bye πŸŽ€πŸ¦‹βœ¨

πŸ“¦ where this page comes from