gnutls_hmac_fast(3)

✨ gnutls_hmac_fast(3) ✨

okay bestie so this is a page from the gnutls manual, and it's about one lil function that does a whole lot in one go πŸ’– it's giving "one call and done", no cap.


πŸŽ€ NAME πŸŽ€

gnutls_hmac_fast β€” it's an API function, that's the whole vibe πŸ¦‹


🌸 SYNOPSIS 🌸

#include <gnutls/crypto.h>

int gnutls_hmac_fast(gnutls_mac_algorithm_t algorithm, const void * key,
size_t keylen, const void * ptext, size_t ptext_len, void * digest);

πŸ’… ARGUMENTS πŸ’…

  • gnutls_mac_algorithm_t algorithm β€” the hash algorithm you wanna use, pick your fighter ⭐
  • const void * key β€” the key you're using πŸ”‘
  • size_t keylen β€” how long that key is, length check, periodt
  • const void * ptext β€” the data you wanna hash, aka the stuff going in πŸ“₯
  • size_t ptext_len β€” how much data there is to hash
  • void * digest β€” this is where the output value of the hash lands, the result goes here bestie ✨

🌈 DESCRIPTION 🌈

so basically? this convenience function hashes your given data and hands you back the output in a single call. one and done, no extra steps, iconic behavior honestly πŸ‘‘

but β€” and this is the important part β€” this call will NOT work for MAC algorithms that require a nonce, like UMAC or GMAC. nope. not happening. if you try it with those it's just not gonna be your moment 😭


πŸ’œ RETURNS πŸ’œ

Zero, or a negative error code if something went wrong. That's it, that's the deal 🫢


🧚 SINCE 🧚

2.10.0 β€” oldie but a goodie, it's been here since forever ⭐


πŸ™ˆ REPORTING BUGS πŸ™ˆ

Found a bug? tell the people, don't suffer in silence:


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.


πŸ”₯ 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/


and that's the whole page babes πŸ’œ this was gnutls version 3.8.13, and yes we are still out here reading gnutls_hmac_fast(3) in the year of our lord. mwah, go hash something πŸŽ€βœ¨

πŸ“¦ where this page comes from