From 51937306525c2121af9673aa906f4b9dc615a55c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Elias=20=C3=85str=C3=B6m?= Date: Tue, 16 Mar 2021 12:09:24 +0100 Subject: [PATCH] Truncate groupcaps_hash to 8 Base64 digits --- mods/CORE/mcl_util/init.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mods/CORE/mcl_util/init.lua b/mods/CORE/mcl_util/init.lua index 408189d1..bac919a8 100644 --- a/mods/CORE/mcl_util/init.lua +++ b/mods/CORE/mcl_util/init.lua @@ -411,5 +411,5 @@ function mcl_util.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 minetest.get_password_hash("ryvnf", minetest.serialize(value)) + return string.sub(minetest.get_password_hash("ryvnf", minetest.serialize(value)), 1, 8) end