diff --git a/docs/changes.txt b/docs/changes.txt index 120524bf9..9f65c37f9 100644 --- a/docs/changes.txt +++ b/docs/changes.txt @@ -30,6 +30,7 @@ ## - Backend: Changed the maximum number of compute devices from 64 to 128 +- Tests: Improved tests for hash-mode 13600 (WinZip) * changes v5.1.0 -> v6.0.0 diff --git a/tools/test_modules/m13600.pm b/tools/test_modules/m13600.pm index ca04a7516..adcd56aed 100644 --- a/tools/test_modules/m13600.pm +++ b/tools/test_modules/m13600.pm @@ -94,7 +94,7 @@ sub module_generate_hash my $auth = hmac_hex ($data, $key_bin, \&sha1, 64); - my $hash = sprintf ('$zip2$*%u*%u*%u*%s*%s*%x*%s*%s*$/zip2$', $type, $mode, $magic, $salt, $verify_bytes, $compress_length, $data, substr ($auth, 0, 20)); + my $hash = sprintf ('$zip2$*%u*%u*%u*%s*%s*%s*%s*%s*$/zip2$', $type, $mode, $magic, $salt, $verify_bytes, $compress_length, unpack ("H*", $data), substr ($auth, 0, 20)); return $hash; } @@ -136,6 +136,8 @@ sub module_verify_hash return unless defined $salt; return unless defined $word; + $param6 = pack ("H*", $param6); + $word = pack_if_HEX_notation ($word); my $new_hash = module_generate_hash ($word, $salt, $param, $param2, $param3, $param4, $param5, $param6);