gnutls_hmac_get_key_size(3)

πŸ’– gnutls_hmac_get_key_size(3) πŸ’–

okay so bestie, this one lives in the gnutls manual, and it's literally the tiniest little glow-up of a function. it tells you how big your HMAC key should be. that's it. that's the whole vibe. but it's important, okay? ✨


✨ NAME ✨

gnutls_hmac_get_key_size β€” API function πŸ’… (yes that's literally the official description, she's giving "just a function, nothing more")


🌸 SYNOPSIS 🌸

#include <gnutls/crypto.h>

unsigned gnutls_hmac_get_key_size(gnutls_mac_algorithm_t algorithm);

like, one include, one call. we love a low-maintenance icon 🫢


πŸŽ€ ARGUMENTS πŸŽ€

  • gnutls_mac_algorithm_t algorithm β€” the mac algorithm to use πŸ’– just hand her the algorithm you're curious about and she'll do the rest, no cap

πŸ¦‹ DESCRIPTION πŸ¦‹

so here's the tea: this function returns the size of the key that should be used with the algorithm you passed in. ✨

and okay, here's the nuance that actually matters β€” for the algorithms that are flexible and could accept arbitrary key sizes, the size she hands back isn't some random number, it's the MAC key size used in the TLS protocol. so like, it's the canonical, protocol-approved number. the one that actually counts. periodt. πŸ‘‘


πŸ’œ RETURNS πŸ’œ

the key size 🌟 … or zero if something went wrong 😭 (zero is the "not me, something's off" signal, don't ignore her)


⭐ SINCE ⭐

3.6.12 β€” she's been here since 3.6.12, an elder statesman at this point, respect her 🫑


πŸ“ REPORTING BUGS πŸ“

found a bug? don't just vague-post about it, bestie, actually tell the maintainers:


Copyright Β© 2001-2023 Free Software Foundation, Inc., and others. πŸ’–

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. (translation: she's free, just keep the receipts 🧾✨)


🌈 SEE ALSO 🌈

the full documentation for gnutls is maintained as a Texinfo manual πŸ“š if the /usr/share/doc/gnutls/ directory does not contain the HTML form, visit:

https://www.gnutls.org/manual/

iykyk πŸ’…


ngl, that's the whole page. no hidden lore, no extra flags, no surprise behavior. she does one thing and she does it well. obsessed, honestly. πŸ₯°

gnutls version 3.8.13, and yes this was documented on gnutls_hmac_get_key_size(3) β€” mwah, bye bestie πŸ’‹πŸ¦‹πŸŒΈ

πŸ“¦ where this page comes from