Lua has built-in string hashing functionality for storage of strings inside its maps. It is possible to access it?
Or is there another string hash function already available in the lua language/libraries?
The hash function is not exposed. By hiding the hash function, the Lua designers reserve the right to change it out from under you. For example, they may one day try "cuckoo hashing", which may work better with a different hash function.
If you want a hash function for storage into a hash table, you will be better off just using a Lua table as your data structure. If you want a hash function to serialize something to disk, you might consider the Kepler project's implementation of MD5 hashing for Lua.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With