pskc_set_key_data_secret(3)
π pskc_set_key_data_secret π
okay bestie, welcome to the libpskc page for pskc_set_key_data_secret, one of the little functions that lowkey does a LOT. this is the one that tucks your raw key bytes into a pskc_key_t handle and base64-encodes them for you, so you don't have to β¨
πΈ NAME πΈ
pskc_set_key_data_secret β the API function that sets the Key Data Secret value. no cap, that's literally its whole job π
π SYNOPSIS π
#include <pskc.h>
int pskc_set_key_data_secret(pskc_key_t * key, const char * data, size_t
len);
π¦ ARGUMENTS π¦
pskc_key_t * keyβ apskc_key_thandle, and you get it frompskc_get_keypackage(). that's your main character right there πconst char * dataβ the byte array holding the key you wanna set, and it'slenbytes long. yes, bytes, not vibes π«Άsize_t lenβ the length of thedatabyte array. count it, don't guess, bestie π
π DESCRIPTION π
so here's the tea: this sets the PSKC KeyPackage Key Data Secret value π₯
the data you pass in is copied into the key handle, so after this function is called you're free to modify or deallocate that data pointer β it's giving "no strings attached" energy, iconic behavior honestly β¨
the data gets base64 encoded by this function, automatically, so you don't have to lift a finger π
and the safety girlie detail: on errors, the old secret is not modified. nothing gets clobbered mid-fail, periodt π
β RETURNS β
PSKC_BASE64_ERRORβ when the base64 encoding goes wrong πPSKC_MALLOC_ERRORβ when memory allocation goes wrong πPSKC_OKβ when everything slays β
π SINCE π
2.2.0 β she's been here a minute, respect the veteran π«Ά
π REPORTING BUGS π
found a bug? don't suffer in silence, report it to <oath-toolkit-help@nongnu.org> π
- libpskc home page:
https://oath-toolkit.codeberg.page/ - general help using GNU software:
http://www.gnu.org/gethelp/
π COPYRIGHT π
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 π«Ά that's the license, bestie, keep the receipts.
and that's the whole page, mwah π this little beauty comes to you from libpskc, version 2.6.15, dated in that footer as 2.6.15 alongside the page name pskc_set_key_data_secret(3) β go forth and set those secrets, you absolute legend π§π
π¦ where this page comes from
- arch rolling: oath-toolkit 2.6.15-1 Β· GPL-3.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms