pskc_get_key_policy_pinmaxlength(3)

✨ pskc_get_key_policy_pinmaxlength(3) ✨

okay bestie, this is a libpskc manual page, and it's here to explain one very specific getter. It's giving β€œsmall function, extremely specific job,” and honestly? iconic.


🌸 NAME 🌸

pskc_get_key_policy_pinmaxlength β€” API function

πŸ¦‹ SYNOPSIS πŸ¦‹

#include <pskc.h>

uint32_t pskc_get_key_policy_pinmaxlength(pskc_key_t * key, int *
present);

πŸŽ€ ARGUMENTS πŸŽ€

  • pskc_key_t * key β€” a pskc_key_t handle, and you get it from pskc_get_keypackage(). That's the source, bestie.
  • int * present β€” an output variable indicating whether data was provided or not. It's the little yes/no messenger.

πŸ”₯ DESCRIPTION πŸ”₯

Okay so this function gets the PSKC KeyPackage Key Policy PINPolicy MaxLength value. Which is a mouthful, but it's literally the maximum length of a PIN that can be set to protect this key.

🚨 Important: it MUST NOT be possible to set a PIN longer than this value. That's not a vibe suggestion, that's a hard requirement.

Now the format math, because it changes what β€œlength” means:

  • If the 'PINFormat' attribute is set to 'DECIMAL', 'HEXADECIMAL', or 'ALPHANUMERIC', this value indicates the number of digits/characters.
  • If the 'PINFormat' attribute is set to 'BASE64' or 'BINARY', this value indicates the number of bytes of the unencoded value.

Also, if present is non-NULL, it will be 0 if the field is not present or 1 if it was present. The way that little pointer just tells you what's up? Obsessed.

πŸ‘‘ RETURNS πŸ‘‘

It returns an integer holding the content. That's the whole return, no plot twist.

😭 REPORTING BUGS 😭

Found a bug? Don't suffer in silence, 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.

And that's the tea, bestie. This page is signed off from libpskc 2.6.15 β€” that's the source/version from the footer. The footer didn't give a separate date, so no invented date energy here, periodt. πŸ’…βœ¨

πŸ“¦ where this page comes from