gnutls_prf_hash_get(3)

πŸ’– gnutls_prf_hash_get(3) β€” the gnutls manual, but make it cute

okay bestie, sit down, we're doing a gnutls page and this one is short but it's lowkey important. it lives in the gnutls manual (section 3, library functions, iykyk) and it's literally one function. one. lil. function. and yet... it knows things about your session. πŸ¦‹


✨ NAME ✨

gnutls_prf_hash_get β€” API function

yes that's the whole name section. it's giving minimalism. we love that for her. πŸ’…


🌸 SYNOPSIS 🌸

#include <gnutls/gnutls.h>

gnutls_digest_algorithm_t gnutls_prf_hash_get(const gnutls_session_t
session);

like, that's it. that's the whole vibe. you include the header, you call the thing, you get a digest algorithm back. periodt. ✨


πŸŽ€ ARGUMENTS πŸŽ€

  • const gnutls_session_t session β€” bestie this is a gnutls_session_t type. that's the whole description, no notes, no lore, it's just a session. hand her over and let the function do its thing. 🫢

πŸ‘‘ DESCRIPTION πŸ‘‘

okay so here's the tea: this function gets you the currently used hash algorithm. that's it, that's the job. πŸ’–

but which hash and why depends on your TLS vibe:

  • in TLS 1.3, that hash algorithm is doing double duty β€” it's used for both the key derivation function and the handshake message authentication code. multitasking queen. two jobs, one hash. πŸ”₯
  • in TLS 1.2, it just matches the hash algorithm used for PRF. simpler era, simpler girl. 🌸

⭐ RETURNS ⭐

the currently used hash algorithm β€” a gnutls_digest_algorithm_t value. that's your answer, go forth and use it. πŸ’…


🌈 SINCE 🌈

3.6.13

been around since 3.6.13, so she's not new new but she's not ancient either. the middle child energy is real. πŸ’€


πŸ™ˆ REPORTING BUGS πŸ™ˆ

found something cursed? tell the devs, they wanna know:

no cap, they actually want the bug reports. don't be shy. πŸ›


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.

(so like... you can copy it, just keep the receipt. keep the notice. that's the deal. πŸŽ€)


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

go read the whole thing, it's a rabbit hole and honestly? worth it. 🧚


and that's the page!! this was gnutls_prf_hash_get(3) from gnutls 3.8.13 β€” go check your local man page for the date stamp if you need it, because bestie this footer only shipped the version. mwah, love u, go read your session's hash algorithm. πŸ’œβœ¨

πŸ“¦ where this page comes from