Fix selftest for hash-mode 18400

This commit is contained in:
R. Yushaev
2018-12-14 13:09:54 +01:00
parent 478fd2c8cf
commit 875d6eb516
2 changed files with 11 additions and 11 deletions
+6 -6
View File
@@ -3211,13 +3211,13 @@ sub verify
(
hash_class => 'HMACSHA1',
iterations => $iter,
output_len => 32,
output_len => 32
);
my $pass_hash = sha256 ($word);
my $derived_key = $kdf->PBKDF2 ($b_salt, $pass_hash);
my $cbc = Crypt::Mode::CBC->new('AES', 0);
my $b_plaintext = $cbc->decrypt($b_ciphertext, $derived_key, $b_iv);
my $cbc = Crypt::Mode::CBC->new ('AES', 0);
my $b_plaintext = $cbc->decrypt ($b_ciphertext, $derived_key, $b_iv);
my $plaintext = unpack ("H*", $b_plaintext);
@@ -10716,15 +10716,15 @@ END_CODE
(
hash_class => 'HMACSHA1',
iterations => $iterations,
output_len => 32,
output_len => 32
);
my $checksum = sha256_hex ($b_plaintext);
my $pass_hash = sha256 ($word_buf);
my $derived_key = $kdf->PBKDF2 ($b_salt, $pass_hash);
my $cbc = Crypt::Mode::CBC->new('AES', 0);
my $b_ciphertext = $cbc->encrypt($b_plaintext, $derived_key, $b_iv);
my $cbc = Crypt::Mode::CBC->new ('AES', 0);
my $b_ciphertext = $cbc->encrypt ($b_plaintext, $derived_key, $b_iv);
my $ciphertext = unpack ("H*", $b_ciphertext);