LC_KEYPAIR_NEW(3)
π lc_keypair_new(3) β the Librecast Programmer's Manual glow-up π
okay bestie, sit down, hydrate, because we're about to make you a whole entire keypair β¨ this one lives in section 3 of the Librecast Programmer's Manual, so you already know it's the good stuff.
πΈ NAME πΈ
lc_keypair_new β create new keypair
like. that's it. that's the whole job. she makes keys. iconic behavior honestly π
π¦ LIBRARY π¦
Librecast library (liblibrecast, -llibrecast)
β¨ SYNOPSIS β¨
#include <librecast/key.h>
int lc_keypair_new(lc_keypair_t *keypair, int flags);
Compile and link with -llibrecast.
not the linker forgetting your library again π we've all been there, add that flag fr fr
π DESCRIPTION π
okay so here's the tea: lc_keypair_new() creates a new signing or encryption keypair. brand new. fresh out the box. main character energy π
The new keypair will be returned in keypair.
flags can be any of the following:
LC_KEY_SIGβ Generate a signing keypair. π₯LC_KEY_ENCβ Generate an encryption keypair. π
pick your fighter bestie, you gotta tell her which kind of keypair you want. that's literally the whole decision. slay.
π«Ά RETURN VALUE π«Ά
lc_keypair_new() returns 0 if the call succeeds, or -1 if an error occurred. In the event of an error, errno is set to indicate the error.
so like, 0 = we ate. -1 = check errno, she's telling you what went wrong π§
π ERRORS π
lc_keypair_new() can fail with the following errors:
EINVALβ Key generation failed.
not the key generation ghosting us π if you see EINVAL, the generation itself did not happen. no keypair for you, bestie.
π SEE ALSO π
lc_keyring_init(3), lc_keyring_free(3), lc_keyring_add(3), lc_keyring_del(3), lc_token_new(3)
go read these next, they're the rest of the friend group π
and that's the page!! brought to you by LIBRECAST, dated 2025-04-02, filed under LC_KEYPAIR_NEW(3) β go forth and generate responsibly, bestie, ily πβ¨π
π¦ where this page comes from
- nixos 26.05: librecast 0.11.2
- nixpkgs unstable: librecast 0.11.2
- ubuntu resolute: liblibrecast-dev 0.11.2-2 Β· GPL-2.0-only OR GPL-3.0-only
- ubuntu stonking: liblibrecast-dev 0.11.2-2build1 Β· GPL-2.0-only OR GPL-3.0-only
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms