pskc_get_key_algparm_chall_min(3)

πŸ’… pskc_get_key_algparm_chall_min(3) β€” like, the libpskc one, bestie

okay so real talk, this is a page straight out of libpskc (section 3 of the manual, iykyk) and it's about one tiny but lowkey important little getter. come on, let's get into it 🫢


✨ NAME ✨

pskc_get_key_algparm_chall_min β€” it's an API function, bestie, that's the whole vibe πŸ’«


✨ SYNOPSIS ✨

#include <pskc.h>

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

✨ ARGUMENTS ✨

  • pskc_key_t * key β€” your pskc_key_t handle, the one you scored from pskc_get_keypackage(). that's your main character right there πŸ‘‘
  • int * present β€” an output variable that tells you whether the data was actually provided or not. like a little vibe check for presence 🌸

✨ DESCRIPTION ✨

so what does it do? it gets the PSKC KeyPackage Key AlgorithmParameters ChallengeFormat Min value. yes that's a mouthful, no we're not shortening it, it's iconic πŸ’…

this attribute defines the minimum size of the challenge accepted by the device for CR mode and β€” listen β€” it MUST be included. not "should", not "if you feel like it". MUST. periodt πŸ”₯

and here's the nuance, because of course there's nuance:

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

also, about that present pointer: if present is non-NULL, it will be 0 if the field is not present, or 1 if it was present. simple as that, no cap ✨


✨ RETURNS ✨

an integer holding the content. that's it, that's the return πŸ’–


✨ REPORTING BUGS ✨

found a bug? don't suffer in silence, tell the people 😭 report bugs 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. slay, honestly πŸŽ€


ngl bestie, if you're reading this page you're probably deep in some PSKC keypackage situation. drink some water. you're doing amazing πŸ’œ

that's a wrap! this gorgeous little page came to you from libpskc, version 2.6.15, dated 2.6.15 in the footer, and yes β€” pskc_get_key_algparm_chall_min(3) all day, every day πŸ¦‹β­

πŸ“¦ where this page comes from