LC_CTX_SET_SYM_KEY(3)
π LC_CTX_SET_SYM_KEY π
ok so bestie, this is the Librecast Programmer's Manual page for LC_CTX_SET_SYM_KEY(3) and honestly? it's giving "keys go here" and that's the whole vibe. Four little functions, all about handing Librecast your encryption keys. Let's go π
β¨ NAME β¨
lc_ctx_set_sym_key, lc_ctx_set_pub_key, lc_channel_set_sym_key, lc_channel_set_pub_key β set Librecast channel encoding keys π
π LIBRARY π
Librecast library (liblibrecast, -llibrecast) π«Ά
πΈ SYNOPSIS πΈ
#include <librecast/net.h>
int lc_ctx_set_sym_key(lc_ctx_t *ctx, unsigned char *key, size_t len);
int lc_ctx_set_pub_key(lc_ctx_t *ctx, unsigned char *key, size_t len);
int lc_channel_set_sym_key(lc_channel_t *chan, unsigned char *key, size_t len);
int lc_channel_set_pub_key(lc_channel_t *chan, unsigned char *key, size_t len");"
Compile and link with -llibrecast.
not me noticing that last line has a lil ");" in it β yes bestie, that's literally what it says, we are copying it exactly, no edits, no cap π
π DESCRIPTION π
These functions set encryption keys for a Librecast context ctx or channel chan. Main character energy: they hold the key. π
lc_ctx_set_sym_key()β sets a symmetric key of length len on a Librecast context. This key will be used by default by any channels subsequently created using the context. Any existing channels will retain their existing key. periodt. πlc_ctx_set_pub_key()β sets a public key of length len on a Librecast context. This key will be used by default by any channels subsequently created using the context. Any existing channels will retain their existing key. same energy fr fr β¨lc_channel_set_sym_key()β sets a symmetric key of length len on a Librecast channel. just the one channel, no takebacks πΈlc_channel_set_pub_key()β sets a public key of length len on a Librecast channel. that's it, that's the function π¦
π«Ά RETURN VALUE π«Ά
These functions return zero on success. On error, -1 is returned and errno is set to indicate the error. so check your return value bestie, it's not gonna text you first π
π ERRORS π
EINVALβ Invalid argument. (iconic of it to just say that, but okay π)
π 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_ctx_new(3), lc_socket_setopt(3), lc_socket_recv(3)
and that's the page!! π this whole thing is from the LIBRECAST crew, dated 2023-07-31, and it lives under LC_CTX_SET_SYM_KEY(3) β slay, mwah, go set some keys πβ¨
π¦ 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