pskc_set_key_a...esp_checkdigits(3)

πŸ’… pskc_set_key_a...esp_checkdigits(3) β€” the libpskc manual, but make it make sense πŸŽ€

okay so real talk, this is a page straight out of the libpskc manual, and it's about ONE tiny little setter function. but bestie, tiny functions are still iconic, so let's get into it ✨


🌸 NAME 🌸

pskc_set_key_algparm_resp_checkdigits β€” it's an API function, and yeah, that name is a whole mouthful, iykyk 😭


✨ SYNOPSIS ✨

#include <pskc.h>

void pskc_set_key_algparm_resp_checkdigits(pskc_key_t * key, int
checkdigit);

that's it, that's the whole vibe. void return, so it gives you nothing back except the satisfaction of a job done 🫢


πŸ¦‹ ARGUMENTS πŸ¦‹

  • pskc_key_t * key β€” a pskc_key_t handle, and you get it from pskc_get_keypackage(). that's your main character right there πŸ‘‘
  • int checkdigit β€” non-zero means you're setting CheckDigit to true, and 0 means, well, not true. simple as that, no cap πŸ’…

πŸ’– DESCRIPTION πŸ’–

so what does this actually DO. it sets the PSKC KeyPackage Key AlgorithmParameters ResponseFormat CheckDigits value 🌟

and this attribute is basically the "do we append a Luhn check digit?" switch. it says whether the device needs to append a Luhn check digit β€” as defined in [ISOIEC7812] β€” to the response. highkey important detail: this is only valid if the 'Encoding' attribute is set to 'DECIMAL' 🚨 like, that's the vibe check it has to pass first.

then it's honestly just a yes/no situation:

  • if the value is TRUE, the device WILL append a Luhn check digit to the response βœ…
  • if the value is FALSE, the device will NOT append a Luhn check digit to the response ❌

literally that's the whole thing. Luhn on, Luhn off. slay πŸ”₯


⭐ SINCE ⭐

2.2.0 β€” so it's been around a minute, it's basically vintage at this point πŸŽ€


πŸ› REPORTING BUGS πŸ›

found a bug?? don't suffer in silence bestie, report it to <oath-toolkit-help@nongnu.org> πŸ’Œ


Copyright Β© 2009-2026 Simon Josefsson.

and the licensing is genuinely chill, no drama: 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 go forth and share the knowledge, just keep the receipt πŸ’œ


and that's the page!! 🌈 this little doc came to you courtesy of libpskc, version 2.6.15 β€” love her, read her, use her responsibly πŸ’–πŸŽ€πŸŒΈ

πŸ“¦ where this page comes from