From d3f3a8a1f3e786965ae473c046db2c34d7d3adb6 Mon Sep 17 00:00:00 2001 From: ame Date: Sat, 6 Apr 2024 16:50:38 -0500 Subject: changed the add metamethod --- tests/hash.lua | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'tests/hash.lua') diff --git a/tests/hash.lua b/tests/hash.lua index edc754b..1f99aca 100644 --- a/tests/hash.lua +++ b/tests/hash.lua @@ -13,6 +13,7 @@ function test(name,b,exp,oargs) local hash4 local hash5 local hash6 + local hash7 local add = "" if oargs == nil then hash = llib.crypto[name](b) @@ -26,12 +27,14 @@ function test(name,b,exp,oargs) hash2 = llib.crypto[name]():update(b):final() hash5 = llib.crypto[name]() hash6 = hash5 + b; - hash5 = hash5:final() + hash6 = hash6:final() + hash5 = hash5:update(b):final() else hash2 = llib.crypto[name](table.unpack(oargs)):update(b):final() hash5 = llib.crypto[name](table.unpack(oargs)) hash6 = hash5 + b; - hash5 = hash5:final() + hash6 = hash6:final() + hash5 = hash5:update(b):final() end if(hash5 ~= exp) then -- cgit v1.2.3