pskc_set_key_algparm_chall_max(3)

πŸ’… pskc_set_key_algparm_chall_max(3) β€” a libpskc moment

okay bestie, so this one lives in libpskc, and it's genuinely just a little setter function. nothing scary. let's get into it 🫢


✨ NAME ✨

pskc_set_key_algparm_chall_max β€” it's an API function, that's the whole vibe πŸ’–


🌸 SYNOPSIS 🌸

#include <pskc.h>

void pskc_set_key_algparm_chall_max(pskc_key_t * key, uint32_t
challmax);

like, literally two things in, nothing out β€” void, she returns nothing, she's lowkey humble about it πŸ‘‘


πŸŽ€ ARGUMENTS πŸŽ€

  • pskc_key_t * key β€” a pskc_key_t handle, and you get it from pskc_get_keypackage(). that's the plug, that's where it comes from πŸ”Œ
  • uint32_t challmax β€” the maximum challenge length to set. the number you're handing over, cute and unsigned ✨

πŸ’œ DESCRIPTION πŸ’œ

so what this actually does: it sets the PSKC KeyPackage Key AlgorithmParameters ChallengeFormat Max value. yes that's a mouthful, no I did not make it up 😭

this attribute defines the maximum size of the challenge accepted by the device for CR mode β€” and bestie, it MUST be included. not optional. mandatory main character requirement, periodt πŸ’…

and here's the part where it depends on the Encoding attribute, so pay attention:

  • if Encoding is set to DECIMAL, HEXADECIMAL, or ALPHANUMERIC, this value indicates the maximum number of digits/characters πŸ”’
  • if Encoding is set to BASE64 or BINARY, this value indicates the maximum number of bytes of the unencoded value 🧊

same field, different unit depending on encoding β€” it's giving "context is everything" ngl πŸ¦‹


⭐ SINCE ⭐

2.2.0 β€” she's been around a minute, an icon of her era πŸ‘‘


πŸ› REPORTING BUGS πŸ›

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


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. (so yes, share it, just keep the receipts, iykyk 🧾)


okay that's the whole page, no cap β€” every flag, every value, every MUST, all of it survived the vibe check πŸ’€βœ¨

libpskc version 2.6.15, this lil' pskc_set_key_algparm_chall_max(3) page β€” mwah, go set those challenge maximums bestie, you're gonna slay πŸŽ€πŸ’–πŸŒŸ

πŸ“¦ where this page comes from