C4 Engine Terathon Software C4 Engine API Documentation

• Utility Library

API Links
Developer Links

Text::GetTextHash

Defined in:  C4String.h
Returns the hash value for a character string.
Prototype

unsigned_int32 GetTextHash(const char *text);

Parameters
text A pointer to a null-terminated character string.
Description
The GetTextHash function returns a 32-bit hash value for the character string specified by the text parameter. The hash algorithm is designed so that different strings appear to have random hash values even if the strings only differ by a small amount.

The hash value returned for the empty string is zero.
NOTE. The GetTextHash function is not intended for cryptographic applications and does not produce a secure hash value. It should not be used for things like password storage.
See Also

HashTable