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