gnutls_hmac(3)

πŸ’– gnutls_hmac(3) πŸ’–

okay bestie, sit DOWN, because this one is from the gnutls manual and it's literally the little function that does the HMAC thing. you're gonna eat this up.


✨ NAME ✨

gnutls_hmac β€” an API function, periodt. it's giving "one job, done well" energy πŸ’…


πŸŽ€ SYNOPSIS πŸŽ€

#include <gnutls/crypto.h>

int gnutls_hmac(gnutls_hmac_hd_t handle, const void * ptext, size_t
ptext_len);

look at her. three little arguments. so unbothered. so iconic. πŸ¦‹


🌸 ARGUMENTS 🌸

  • gnutls_hmac_hd_t handle β€” bestie this is a gnutls_hmac_hd_t type. that's the whole description. it's a handle, it holds your whole situation together 🫢
  • const void * ptext β€” the data to hash. the actual tea. the stuff you want mushed into a digest β˜•
  • size_t ptext_len β€” the length of data to hash. yes ma'am, we need to know how much data, we are not out here guessing byte counts πŸ”₯

πŸ’œ DESCRIPTION πŸ’œ

so what does she DO? she will hash the given data using the algorithm specified by the context. that's it. that's the whole vibe. the context already knows which algorithm you picked (because you picked it when you set the handle up, duh), and this function just takes your data and runs it through. no cap, that's literally all ✨


⭐ RETURNS ⭐

Zero or a negative error code on error. so: 0 means slay, anything negative means something went sideways 😭 always check her, fr fr.


🌈 SINCE 🌈

2.10.0 β€” she's been around since 2.10.0, an absolute veteran, a legend in these streets πŸ‘‘


πŸ™ˆ REPORTING BUGS πŸ™ˆ

found a bug? not me manifesting that, but if it happens, report bugs to <bugs@gnutls.org>.

Home page: https://www.gnutls.org


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. (yes girl, free as in freedom, no royalty, just vibes 🌸)


🧚 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 πŸ’…


okay that's the whole page bestie, mwah, go forth and HMAC responsibly. πŸ“

sign-off time: this came from the gnutls manual, version 3.8.13, page gnutls_hmac(3) β€” catch you on the next one, love u, bye! πŸ’–βœ¨πŸŽ€

πŸ“¦ where this page comes from