LC_KEYRING_ADD(3)

✨ lc_keyring_add πŸ’– (that's the page title bestie, and we're in the Librecast Programmer's Manual, section 3)

okay so. hi. welcome to the manual page for lc_keyring_add and lc_keyring_del β€” yes BOTH of them, they're a package deal, they share a page like they share a keyring πŸŽ€

🌸 NAME 🌸

lc_keyring_add, lc_keyring_del β€” add and remove keys to/from a keyring ✨

πŸ“š LIBRARY πŸ“š

Librecast library, which is liblibrecast, and you link it with -llibrecast 🫢

πŸ¦‹ SYNOPSIS πŸ¦‹

#include <librecast/key.h>

int lc_keyring_add(lc_keyring_t *keyring, uint8_t *key);
int lc_keyring_del(lc_keyring_t *keyring, uint8_t *key);

Compile and link with -llibrecast.

not me including the header AND the link flag, because the compiler will absolutely humble you if you forget either one πŸ’€

πŸ‘‘ DESCRIPTION πŸ‘‘

lc_keyring_add() adds key to keyring. simple as. it's giving "put the thing in the thing" and honestly? iconic.

lc_keyring_del() removes key from keyring. the reverse vibe. the un-add. the take-it-back-ery. πŸ’…

keyring is a pointer to the keyring to manage. you're the manager now. main character energy fr fr 🌈

key is a pointer to the key to add.


πŸ’– RETURN VALUE πŸ’–

these functions return 0 if the call succeeds, or -1 if an error occurred. yes bestie, classic zero-for-yay, minus-one-for-nay πŸ“

and in the event of an error, errno is set to indicate the error. so check it!! don't just stare at the -1 like it owes you money 😭


🚨 ERRORS 🚨

lc_keyring_add can fail with the following errors:

  • ENOMEM β€” not enough space to add key. Keyring is full. it's packed. it's booked. it's at capacity. no more keys, the keyring said no πŸ™ˆ

lc_keyring_del can fail with the following errors:

  • ENOKEY β€” the requested key could not be found. you can't delete what was never there, bestie πŸ’€

πŸ”₯ SEE ALSO πŸ”₯

lc_keyring_init(3), lc_keyring_free(3), lc_keyring_has(3), lc_channel_filter_set(3), lc_channel_new(3), lc_keypair_new(3)

go read those too, the lore is deep and the pipeline is real 🧚

and that's the whole page!! this was LIBRECAST, dated 2025-04-02, and this is LC_KEYRING_ADD(3) signing off πŸ’œ mwah, go add a key, you got this ⭐

πŸ“¦ where this page comes from