aboutsummaryrefslogtreecommitdiff
path: root/tests/hash.lua
diff options
context:
space:
mode:
authorame <[email protected]>2024-04-06 16:50:38 -0500
committerame <[email protected]>2024-04-06 16:50:38 -0500
commitd3f3a8a1f3e786965ae473c046db2c34d7d3adb6 (patch)
tree639c6d618b44f0ff2a4fcac9f557b906f37cbec3 /tests/hash.lua
parent6dbb6dc2104237299cca414cd3a86256122e4abf (diff)
changed the add metamethod
Diffstat (limited to 'tests/hash.lua')
-rw-r--r--tests/hash.lua7
1 files changed, 5 insertions, 2 deletions
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