1
0
mirror of https://github.com/hashcat/hashcat.git synced 2024-12-22 14:48:12 +00:00

Merge pull request #3840 from philsmd/padding_for_for_13400_29800_tests

verify test fix for -m 13400/-m 29700
This commit is contained in:
Jens Steube 2023-08-25 16:09:25 +02:00 committed by GitHub
commit 042f913590
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 38 additions and 2 deletions

View File

@ -239,14 +239,32 @@ sub module_generate_hash
$final_algorithm = "Crypt::Rijndael";
}
my $cipher = Crypt::CBC->new ({
my $cipher;
if ($version == 1)
{
$cipher = Crypt::CBC->new ({
key => $final_key,
cipher => $final_algorithm,
iv => $enc_iv,
literal_key => 1,
header => "none",
padding => "standard",
keysize => 32
});
}
else
{
$cipher = Crypt::CBC->new ({
key => $final_key,
cipher => $final_algorithm,
iv => $enc_iv,
literal_key => 1,
header => "none",
padding => "none",
keysize => 32
});
}
my $hash;

View File

@ -243,14 +243,32 @@ sub module_generate_hash
$final_algorithm = "Crypt::Rijndael";
}
my $cipher = Crypt::CBC->new ({
my $cipher;
if ($version == 1)
{
$cipher = Crypt::CBC->new ({
key => $final_key,
cipher => $final_algorithm,
iv => $enc_iv,
literal_key => 1,
header => "none",
padding => "standard",
keysize => 32
});
}
else
{
$cipher = Crypt::CBC->new ({
key => $final_key,
cipher => $final_algorithm,
iv => $enc_iv,
literal_key => 1,
header => "none",
padding => "none",
keysize => 32
});
}
my $hash;