pskc_get_key_algparm_resp_length(3)

๐Ÿ’… pskc_get_key_algparm_resp_length โ€” from the libpskc girlies (section 3, mwah) ๐ŸŽ€

okay so bestie, welcome to the libpskc corner of the manual, section 3, and today's main character is pskc_get_key_algparm_resp_length. she's a getter. she gets things. specifically one thing. let's go โœจ


๐ŸŒธ NAME ๐ŸŒธ

pskc_get_key_algparm_resp_length โ€” literally an API function, that's the whole job description ๐Ÿซถ


๐Ÿฆ‹ SYNOPSIS ๐Ÿฆ‹

#include <pskc.h>

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

like, that's it. that's the whole vibe. include the header, call the function, receive a uint32_t. slay ๐Ÿ’…


๐Ÿ’– ARGUMENTS ๐Ÿ’–

  • pskc_key_t * key โ€” a pskc_key_t handle, and you get it from pskc_get_keypackage(). don't just make one up out of nowhere, that's not the vibe ๐Ÿ™ˆ
  • int * present โ€” an output variable that tells you whether the data was actually provided or not. it's giving "receipts" ๐Ÿงพ

โœจ DESCRIPTION โœจ

okay so what does she actually do? she gets the PSKC KeyPackage Key AlgorithmParameters ResponseFormat Length value. yes that's a lot of words, i know, breathe. ๐Ÿ˜ฎโ€๐Ÿ’จ

this attribute defines the length of the response generated by the device and MUST be included โ€” like, not optional, not "if you feel like it", it's a must, periodt ๐Ÿ‘‘

and here's the part where the encoding matters, so pay attention bestie:

  • if the 'Encoding' attribute is set to 'DECIMAL', 'HEXADECIMAL', or ALPHANUMERIC, this value indicates the number of digits/characters. ๐Ÿ”ข
  • if the 'Encoding' attribute is set to 'BASE64' or 'BINARY', this value indicates the number of bytes of the unencoded value. ๐Ÿงฌ

(yeah, ALPHANUMERIC is unquoted in the original and the others are quoted โ€” i don't make the rules, i just report them faithfully ๐Ÿ’€)

also, 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. she's an integer and she holds content and we love her for it ๐Ÿ’œ


๐Ÿ˜ญ 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 like, go off, remix it, just keep the credit ok? ๐ŸŽ€


ngl the whole "MUST be included" thing is real โ€” if you're skipping that attribute, that's not a vibe check you're passing ๐Ÿ’€

and that's the page!! this iconic little number came to you from libpskc, version 2.6.15 โ€” mwah, bye bestie, go get those response format lengths ๐Ÿฆ‹๐Ÿ’–๐ŸŽ€

๐Ÿ“ฆ where this page comes from