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 vibeunsigned int flagsβ bestie, should be0for 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:
<bugs@gnutls.org>- Home page:
https://www.gnutls.org
π COPYRIGHT π
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
- alpine 3.22: gnutls-doc 3.8.13-r0 Β· LGPL-2.1-or-later
- alpine 3.23: gnutls-doc 3.8.13-r0 Β· LGPL-2.1-or-later
- alpine 3.24: gnutls-doc 3.8.13-r0 Β· LGPL-2.1-or-later
- arch rolling: gnutls 3.8.13-3 Β· GPL-3.0-or-later AND LGPL-2.1-or-later
- fedora 43: gnutls-devel 3.8.13-1.fc43 Β· GPL-3.0-or-later AND LGPL-2.1-or-later
- fedora 43: gnutls-devel 3.8.13-1.fc43 Β· GPL-3.0-or-later AND LGPL-2.1-or-later
- fedora 44: gnutls-devel 3.8.13-1.fc44 Β· GPL-3.0-or-later AND LGPL-2.1-or-later
- fedora 44: gnutls-devel 3.8.13-1.fc44 Β· GPL-3.0-or-later AND LGPL-2.1-or-later
- ubuntu stonking: gnutls-doc 3.8.13-1ubuntu1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms