pskc_set_key_data_b64secret(3)

πŸ’… pskc_set_key_data_b64secret(3) β€” the libpskc glow-up

okay so bestie, you're in the libpskc section 3 manpage zone ✨ this one function is literally the one that tucks your base64 secret into a key handle, and it's giving "small but mighty" πŸŽ€


✨ NAME ✨

pskc_set_key_data_b64secret β€” the API function that sets your Key Data Secret as a base64 string πŸ’–


🌸 SYNOPSIS 🌸

#include <pskc.h>

int pskc_set_key_data_b64secret(pskc_key_t * key, const char *
b64secret);

πŸ¦‹ ARGUMENTS πŸ¦‹

  • pskc_key_t * key β€” a pskc_key_t handle, and you get it from pskc_get_keypackage(). that's the one, that's your main character 🫢
  • const char * b64secret β€” the base64 encoded secret you want to set. yes queen, hand it over πŸ’…

πŸ’œ DESCRIPTION πŸ’œ

so here's the tea β˜• this function sets the PSKC KeyPackage Key Data Secret value in base64, as a zero-terminated string. periodt.

the b64secret data gets copied into the key handle, so after you call this you're totally free to modify or deallocate the b64secret pointer β€” it's not holding onto your pointer, no cap πŸ™ˆ

also, the data is base64 decoded right here by this function to verify data validity. lowkey a vibe check on your secret πŸ”₯ and on errors, the old secret is not modified β€” so nothing gets clowned, your previous value stays safe πŸ’€βœ‹


⭐ RETURNS ⭐

  • PSKC_BASE64_ERROR β€” when the base64 decoding goes wrong 😭
  • PSKC_MALLOC_ERROR β€” when memory allocation goes wrong πŸ’€
  • PSKC_OK β€” on success, slay πŸ‘‘

🌈 SINCE 🌈

2.2.0 β€” she's been iconic since day one, iykyk πŸ’«


πŸ“ REPORTING BUGS πŸ“

found a bug? bestie, report it to <oath-toolkit-help@nongnu.org> πŸ“§


Copyright Β© 2009-2026 Simon Josefsson.

Copying and distribution of this file, with or without modification, are permitted in any medium without royalty provided the copyright notice and this notice are preserved. fr fr, that's the whole license vibe 🫢


ngl this page is from libpskc, version 2.6.15 🧚 and that's the whole pskc_set_key_data_b64secret(3) situation β€” go set those secrets, bestie, you're gonna ate πŸ’–βœ¨πŸŽ€
πŸ“¦ where this page comes from