aboutsummaryrefslogtreecommitdiff
path: root/tests/hash.lua
diff options
context:
space:
mode:
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