pskc_set_key_policy_pinencoding(3)

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

okay so bestie, this one lives in the libpskc manual (section 3, dev vibes only) and it's literally the setter for the PIN encoding on a key policy. tiny function, big "I control the encoding" energy. let's get into it 🫢


✨ NAME ✨

pskc_set_key_policy_pinencoding β€” an API function, no cap. it sets stuff. that's the whole name, that's the whole job πŸ’…


🌸 SYNOPSIS 🌸

#include <pskc.h>

void pskc_set_key_policy_pinencoding(pskc_key_t * key, pskc_valueformat
pinencoding);

so you pull in <pskc.h> and then you call it β€” returns void, so no "did it work" moment, she just does her thing and leaves 😌


πŸŽ€ ARGUMENTS πŸŽ€

  • pskc_key_t * key β€” a pskc_key_t handle. and where do you get one of those? from pskc_get_keypackage(), bestie, that's the plug ✨
  • pskc_valueformat pinencoding β€” the pskc_valueformat encoding you want to set. that's it, that's the arg 🌈

πŸ‘‘ DESCRIPTION πŸ‘‘

okay so here's the tea πŸ“: this sets the PSKC KeyPackage Key Policy PINPolicy PINEncoding value. long name, iconic function.

and what does that attribute even mean? it indicates the encoding of the PIN, and it MUST be one of the pskc_valueformat values. like, not optional, not "eh close enough", it HAS to be one of those. it's giving strict parents 😭 but honestly? respect.

so:

  • you got a key handle βœ…
  • you pick a pskc_valueformat βœ…
  • you set the PINEncoding βœ…
  • slay πŸ’…
lowkey important: the MUST is doing real work there. don't hand it a random number and hope for the best, fr fr πŸ™ˆ

⭐ SINCE ⭐

2.2.0 β€” so she's been around a minute. vintage. iconic. πŸŽ€


πŸ”₯ REPORTING BUGS πŸ”₯

found a bug? don't suffer in silence, tell the people:

they're literally waiting to hear from you, bestie 🫢


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.

(translation: keep the notice, keep the vibes, no money required ✨)


🌈 and that's the page!! this little gem is from libpskc, version 2.6.15 β€” shoutout to the version string, she ate. go set some PIN encodings, bestie, you got this πŸ’œπŸŽ€πŸ¦‹

πŸ“¦ where this page comes from