table of contents
|NE_STRHASH(3)||neon API reference||NE_STRHASH(3)|
ne_strhash, ne_vstrhash - string hash interface
char *ne_strhash(unsigned int flags, ...);
char *ne_vstrhash(unsigned int flags, va_list ap);
The ne_strhash and ne_vstrhash functions can be used 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 option. The hash is calculated for the concatenation of the argument list, without separators.
The following hash algorithms are available:
By default, the hash is returned as a hexadecimal lower-case character string. The following formatting options are available:
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.
Joe Orton <firstname.lastname@example.org>
|14 May 2022||neon 0.0.0-dev|