Purple  0.1
Standard Language Specification
Macros | Functions
hash.h File Reference

Function headers and definitions for hashing algorithms. More...

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define FNV_OFFSET_BASIS   0xCBF29CE484222325
 
#define FNV_PRIME   0x100000001B3
 

Functions

unsigned long int FNV_1 (char *str)
 FNV-1 String hashing algorithm as defined here: https://en.wikipedia.org/wiki/Fowler%E2%80%93Noll%E2%80%93Vo_hash_function#FNV-1_hash. More...
 

Detailed Description

Function headers and definitions for hashing algorithms.

Author
Charles Averill
Date
17-Sep-2022

Macro Definition Documentation

◆ FNV_OFFSET_BASIS

#define FNV_OFFSET_BASIS   0xCBF29CE484222325

Offset basis for FNV-1 algorithm

◆ FNV_PRIME

#define FNV_PRIME   0x100000001B3

Prime number for FNV-1 algorithm

Function Documentation

◆ FNV_1()

unsigned long int FNV_1 ( char *  str)

FNV-1 String hashing algorithm as defined here: https://en.wikipedia.org/wiki/Fowler%E2%80%93Noll%E2%80%93Vo_hash_function#FNV-1_hash.

Parameters
strString to be hashed
Returns
unsigned long int Hash value