LC_CTX_GETKEY(3)
π LC_CTX_GETKEY β Librecast Programmer's Manual, section 3 π
okay bestie, sit down, hydrate, and let's talk keys π this one's from the Librecast Programmer's Manual, section 3 (you know, the C library section, we love her), and it's all about getting and setting keys on Librecast contexts and channels. no cap.
β¨ NAME β¨
lc_ctx_getkey, lc_ctx_setkey, lc_channel_getkey, lc_channel_setkey β set Librecast channel encoding options π
π LIBRARY π
Librecast library (liblibrecast, -llibrecast) β link her and she's yours π«Ά
πΈ SYNOPSIS πΈ
#include <librecast/net.h>
int lc_ctx_getkey(lc_ctx_t *ctx, lc_key_t *key, int type);
int lc_ctx_setkey(lc_ctx_t *ctx, lc_key_t *key, int type);
int lc_channel_getkey(lc_channel_t *chan, lc_key_t *key, int type);
int lc_channel_setkey(lc_channel_t *chan, lc_key_t *key, int type);
Compile and link with -llibrecast. yes literally just that. compile. link. slay. π
π DESCRIPTION π
So these four functions get or set keys for a Librecast context ctx or channel chan. That's the whole vibe. four functions, two targets, keys. iconic.
key is a pointer to an lc_key_t structure. The set functions will use this to set the key on the context or channel, and the set functions will return a copy of the current key in this structure β and yes bestie, it really does say set both times, I'm literally just reading the page to you, I don't make the rules π
The type argument must be one of the following options:
LC_CODE_SYMMβ Symmetric key. πLC_CODE_PUBKβ Public key. ποΈ
π RETURN VALUE π
These functions return zero on success. On error, -1 is returned and errno is set to indicate the error. zero = we ate. -1 = check errno, bestie, she's telling you everything. π
π₯ ERRORS π₯
EINVALβ Invalid argument.
that's it. that's the list. one error, doing her best. π
π SEE ALSO π
lc_ctx_coding_set(3), lc_channel_new(3), lc_channel_close(3), lc_channel_coding_set(3), lc_channel_send(3), lc_channel_set_sym_key(3), lc_ctx_new(3), lc_socket_setopt(3), lc_socket_recv(3)
go read those next, iykyk πβ¨
and that's the whole page, bestie π¦ this one ships from LIBRECAST, dated 2023-07-31, and it lives at the very bottom of LC_CTX_GETKEY(3) β go forth and set your keys, you main character πππ
π¦ where this page comes from
- debian trixie: liblibrecast-dev 0.9.1-1 Β· GPL-2.0-only OR GPL-3.0-only
- nixos 26.05: librecast 0.11.2
- nixpkgs unstable: librecast 0.11.2
- ubuntu noble: liblibrecast-dev 0.8.0-1.1build1 Β· GPL-2.0-only OR GPL-3.0-only
- ubuntu questing: liblibrecast-dev 0.9.1-1
- 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