gnutls_utf8_password_normalize(3)

✨ gnutls_utf8_password_normalize ✨

okay bestie, welcome to the gnutls manual πŸ’– this one's a lil API function page and it's lowkey iconic, so let's get into it.


🌸 NAME 🌸

gnutls_utf8_password_normalize β€” it's an API function, periodt.


πŸŽ€ SYNOPSIS πŸŽ€

#include <gnutls/gnutls.h>

int gnutls_utf8_password_normalize(const unsigned char * password,
       unsigned plen, gnutls_datum_t * out, unsigned flags);

πŸ¦‹ ARGUMENTS πŸ¦‹

  • const unsigned char * password β€” this is holding your UTF-8 formatted password, like the actual vibes you're trying to normalize πŸ’…
  • unsigned plen β€” the length of the password you just handed over. gotta know how many bytes we're working with, no cap.
  • gnutls_datum_t * out β€” where the result lands: a null-terminated allocated string. yes bestie, it's allocated, it's yours now 🫢
  • unsigned flags β€” should be zero. that's it. that's the whole vibe. zero.

⭐ DESCRIPTION ⭐

so what does this actually do? it will convert the UTF-8 password you gave it according to the normalization rules in RFC7613. it's giving "let me tidy this up for you" energy, fr fr. 🧚

and here's the tea: if the flag GNUTLS_UTF8_IGNORE_ERRS is specified, then any UTF-8 encoding errors will be ignored, and in that case the output will be a copy of the input. like, no transformation, just a lil duplicate. main character behavior honestly.


πŸ’œ RETURNS πŸ’œ

  • GNUTLS_E_INVALID_UTF8_STRING β€” when the UTF-8 data is invalid, aka the vibe check failed 😭
  • 0 β€” on success. we love to see it πŸ‘‘

🌈 SINCE 🌈

3.5.7 β€” been around since then, an OG ✨


πŸ’€ REPORTING BUGS πŸ’€

found a bug? don't suffer in silence bestie, tell the devs:


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: go off, 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/


and that's the whole page, bestie!! 🌸 this was the gnutls manual, version 3.8.13, documenting gnutls_utf8_password_normalize(3) β€” now go normalize some passwords and slay πŸ’…βœ¨πŸ¦‹

πŸ“¦ where this page comes from