diff options
| author | ame <[email protected]> | 2024-04-06 16:50:38 -0500 |
|---|---|---|
| committer | ame <[email protected]> | 2024-04-06 16:50:38 -0500 |
| commit | 7fbafae25ca81e9acb745fd75ef7f1be55ad7d92 (patch) | |
| tree | 639c6d618b44f0ff2a4fcac9f557b906f37cbec3 /tests | |
| parent | b8c10dac99316974d142c530356ad5cd8fdf9afa (diff) | |
changed the add metamethod
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/hash.lua | 7 |
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 |
