gnutls_crypto_register_digest(3)
π gnutls_crypto_register_digest β API function π
okay so bestie, this one lives in the gnutls manual and it's literally called gnutls_crypto_register_digest. she's giving "let me plug my own hash into the crypto stack" energy, and honestly? iconic. let's get into it π
β¨ NAME β¨
gnutls_crypto_register_digest β API function. yeah that's it, that's the whole vibe. π¦
πΈ SYNOPSIS πΈ
#include <gnutls/crypto.h>
int gnutls_crypto_register_digest(gnutls_digest_algorithm_t algorithm,
int priority, gnutls_digest_init_func init, gnutls_digest_hash_func
hash, gnutls_digest_output_func output, gnutls_digest_deinit_func
deinit, gnutls_digest_fast_func hash_fast);
π ARGUMENTS π
gnutls_digest_algorithm_t algorithmβ the gnutls digest identifier, aka which digest you're claiming. no cap. π₯int priorityβ the priority of the algorithm. yes queen, she has a rank.gnutls_digest_init_func initβ a function which initializes the digest. warm-up era. β¨gnutls_digest_hash_func hashβ perform the hash operation. the main character moment. πgnutls_digest_output_func outputβ provide the output of the digest. serving results, periodt.gnutls_digest_deinit_func deinitβ a function which deinitializes the digest. she's logging off, respectfully. π«Άgnutls_digest_fast_func hash_fastβ perform the digest operation in one go. speedrun mode fr fr. β
π DESCRIPTION π
so basically this function will register a digest algorithm to be used by gnutls. your algorithm, your rules, your moment π
any algorithm you register will override the included algorithms β and by convention, kernel implemented algorithms have a priority of 90 and CPU-assisted have a priority of 80. noting that down, bestie, because it matters:
the algorithm with the lowest priority will be used by gnutls. lowest = winner. yes it's backwards from what you'd expect and yes it's still the rule. π§
π DEPRECATED π
not me having to tell you thisβ¦ since 3.7.0 it is no longer possible to override cipher implementation. π
read that again, bestie. deprecated. the override door? closed. π
β RETURNS β
GNUTLS_E_SUCCESS on success, otherwise a negative error code. so if you see a negative number, that's not a vibe check you passed. π
π¦ SINCE π¦
3.4.0 β she's been around a minute, an OG. π
π REPORTING BUGS π
found a bug? spill it, don't sit on it:
- report bugs to
<bugs@gnutls.org> - home page:
https://www.gnutls.org
π COPYRIGHT π
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. free as in go off, but 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. go read the whole manual, she's long but she's worth it. πΈ
okay that's the whole page, bestie β every flag, every default, every warning, all of it, nothing skipped. and for the cute sign-off: this was gnutls version 3.8.13, serving gnutls_crypto_register_digest(3) realness. mwah. π
β¨
π¦ where this page comes from
- alpine 3.22: gnutls-doc 3.8.13-r0 Β· LGPL-2.1-or-later
- alpine 3.23: gnutls-doc 3.8.13-r0 Β· LGPL-2.1-or-later
- alpine 3.24: gnutls-doc 3.8.13-r0 Β· LGPL-2.1-or-later
- arch rolling: gnutls 3.8.13-3 Β· GPL-3.0-or-later AND LGPL-2.1-or-later
- fedora 43: gnutls-devel 3.8.13-1.fc43 Β· GPL-3.0-or-later AND LGPL-2.1-or-later
- fedora 43: gnutls-devel 3.8.13-1.fc43 Β· GPL-3.0-or-later AND LGPL-2.1-or-later
- fedora 44: gnutls-devel 3.8.13-1.fc44 Β· GPL-3.0-or-later AND LGPL-2.1-or-later
- fedora 44: gnutls-devel 3.8.13-1.fc44 Β· GPL-3.0-or-later AND LGPL-2.1-or-later
- ubuntu stonking: gnutls-doc 3.8.13-1ubuntu1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms