mirror of
https://git.minetest.land/VoxeLibre/VoxeLibre.git
synced 2024-11-19 09:31:07 +01:00
Update groupcaps_hash function to minetest.sha1
This commit is contained in:
parent
a6c5c8a72a
commit
4ca89cfcae
1 changed files with 1 additions and 4 deletions
|
@ -2,10 +2,7 @@ local groupcaps_cache = {}
|
|||
|
||||
-- Compute a hash value.
|
||||
function compute_hash(value)
|
||||
-- minetest.get_password_hash is quite fast, even if it uses a
|
||||
-- cryptographic hashing function (SHA-1). It is written in C++ and it
|
||||
-- is probably hard to write a faster hashing function in Lua.
|
||||
return string.sub(minetest.get_password_hash("ryvnf", minetest.serialize(value)), 1, 8)
|
||||
return string.sub(minetest.sha1(minetest.serialize(value)), 1, 8)
|
||||
end
|
||||
|
||||
-- Get the groupcaps and hash for an enchanted tool. If this function is called
|
||||
|
|
Loading…
Reference in a new issue