pskc_get_key_data_counter(3)

πŸ’… pskc_get_key_data_counter β€” the libpskc glow-up

okay so bestie, this is a function from libpskc (yes, that libpskc, version 2.6.15, she's iconic) and her whole job is grabbing one tiny little number out of a key package. that's it. that's the vibe. let's get into it πŸŽ€


✨ NAME ✨

pskc_get_key_data_counter β€” literally just "API function", that's what the manpage says, that's what we're going with πŸ’–


🌸 SYNOPSIS 🌸

#include <pskc.h>

uint64_t pskc_get_key_data_counter(pskc_key_t * key, int * present);

look at her. so clean. so uint64_t. slay πŸ”₯


πŸ¦‹ ARGUMENTS πŸ¦‹

  • pskc_key_t * key β€” a pskc_key_t handle, and you get it from pskc_get_keypackage(). that's your ticket in, no cap 🎟️
  • int * present β€” an output variable that tells you whether data was provided or not. it's the "did she actually show up" indicator, iykyk

πŸ’œ DESCRIPTION πŸ’œ

Get the PSKC KeyPackage Key Data Counter value ✨. This element contains the event counter for event-based OTP algorithms β€” so like, it's counting events for the OTP girlies 🧚

and here's the important bit, pay attention bestie: if present is non-NULL, it will be 0 if the Counter field is not present, or 1 if it was present. that's it. 0 or 1. she's a yes/no queen πŸ‘‘


⭐ RETURNS ⭐

an integer holding the content. uint64_t in the synopsis, "an integer" in the returns β€” the manpage said what it said, we're not editing her 🫢


🌈 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. periodt πŸ’…


ngl this one's short and sweet β€” if you're passing present, always give her a real int to point at, mmkay? πŸ™ˆ

that's the whole page, bestie β€” pskc_get_key_data_counter(3) from libpskc 2.6.15, brought to you by the libpskc gang. go forth and count your events πŸ’–βœ¨πŸŽ€

πŸ“¦ where this page comes from