NE_STRHASH(3)

πŸ’– ne_strhash(3) πŸ’–

okay so this is the string-hash page from the neon API reference, and bestie, it's giving very useful utility energy. it's literally the ne_strhash / ne_vstrhash interface. hash girl summer, no cap πŸ’…

✨ NAME ✨

ne_strhash, ne_vstrhash β€” string hash interface

πŸŽ€ SYNOPSIS πŸŽ€

#include <ne_string.h>

char *ne_strhash(unsigned int flags, ...);

char *ne_vstrhash(unsigned int flags, va_list ap);

🌸 DESCRIPTION 🌸

okay so ne_strhash and ne_vstrhash are the functions you use to create hashes. The varargs argument list must be const char * strings followed by a NULL terminator. The flags argument must select exactly one hash algorithm from the list below, which can be optionally bitwise-ORed with one of the formatting options. The hash is calculated for the concatenation of the argument list, without separators β€” no sneaky commas, no spaces, just vibes and bytes πŸ”₯

πŸ”₯ Hash algorithms πŸ”₯

The following hash algorithms are available:

  • NE_HASH_MD5 β€” MD5
  • NE_HASH_SHA1 β€” SHA-1
  • NE_HASH_SHA256 β€” SHA-256 (SHA-2)
  • NE_HASH_SHA512 β€” SHA-512 (SHA-2)
  • NE_HASH_SHA512_256 β€” SHA-512/256 (SHA-2)

πŸ¦‹ Formatting options πŸ¦‹

By default, the hash is returned as a hexadecimal lower-case character string. The following formatting options are available:

  • NE_HASH_COLON β€” colon-separated hex pairs, e.g. "aa:11:22..."
  • NE_HASH_SPACE β€” space-separated hex pairs, e.g. "aa 11 22..."

πŸ‘‘ RETURN VALUE πŸ‘‘

The return value is the ASCII hexadecimal representation of the hash as a malloc-allocated, NUL-terminated string, or NULL if the hash cannot be created. The string length is determined by the hash algorithm (and formatting options used). Support for hash algorithms is specific to the SSL toolkit with which neon is compiled. Some systems will further restrict hash availability at runtime, e.g. due to FIPS mode. so yeah, check your toolkit, bestie 🫢

🌈 HISTORY 🌈

ne_strhash and ne_vstrhash are available in neon 0.32.0 and later.

The NE_HASH_SHA1 flag is available in neon 0.37.0 and later.

Copyright Β© 2001-2026 Joe Orton


byeee, this page is from neon, dated 03/20/2026, and it's the NE_STRHASH(3) page β€” mwah 🫢

πŸ“¦ where this page comes from