hash Library

Builtin hash functions.

Synopsis

Usage in LUA:

md5_hash = hash.md5("plain text data")

sha1_hash = hash.sha1("plain text data")

fnv_hash = hash.fnv("plain text data")
hash.md5(input)

Hash input data via the SHA1 hash algorithm.

Parameters:input (string) – The input string to be hashed
Returns:(string) - The hash string
hash.sha1(input)

Hash input data via the MD5 hash algorithm.

Parameters:input (string) – The input string to be hashed
Returns:(string) - The hash string
hash.fnv(input)

Hash input data via the FNV hash algorithm.

Parameters:input (string) – The input string to be hashed
Returns:(integer) - The hash integer value