KCAPI_MD_SHA224(3)

πŸ’– NAME πŸ’–

kcapi_md_sha224 β€” SHA-224 message digest on one buffer ✨

Okay so bestie, this is the one-shot glow-up for your SHA-224 hashing needs πŸŽ€


✨ SYNOPSIS ✨

ssize_t kcapi_md_sha224(const uint8_t * in, size_t inlen, uint8_t * out,
                        size_t outlen);

🫢 ARGUMENTS 🫢

  • in β€” [in] the buffer holding your input data, like the tea you're about to hash πŸ’…
  • inlen β€” [in] how long that input buffer is, in bytes, no cap
  • out β€” [out] the buffer where the message digest gets dropped off πŸ¦‹
  • outlen β€” [in] the length of out, bestie, and yes it matters

🌸 DESCRIPTION 🌸

This is a one-shot convenience function, and honestly? It ate. πŸ“ You hand it a buffer, it generates a message digest of that buffer, done, periodt.

The output buffer is your responsibility, bestie β€” you have to allocate it yourself, and it needs to be at least the length of the message digest size for the message digest you chose. Not me letting you skimp on buffer space πŸ’€

Now the return values, because this is the part where the vibes get real:

  • On success it returns the size of the message digest πŸ‘‘
  • -EIO β€” the data cannot be obtained 😭
  • -ENOMEM β€” the buffer is too small for the complete message digest, so it gets filled with the truncated message digest πŸ™ˆ
⚠️ Lowkey important: that -ENOMEM case isn't just an error you shrug at β€” the buffer still gets filled, just with a truncated digest. So like, read your return values, fr fr.

πŸ’œ AUTHOR πŸ’œ

Stephan Mueller <smueller@chronox.de> β€” author, main character energy, we stan πŸ’–


Nothing extra to spill here, bestie β€” the copyright deets live down in the footer with the rest of the fine print 🧚


That's the whole page, iykyk ✨ This was libkcapi Manual 1.5.0, dated July 2025, and the man page was KCAPI_MD_SHA224(3). Go forth and hash responsibly, bestie β€” slay πŸ’…πŸŒˆ

πŸ“¦ where this page comes from