Skip to content

Commit 393fff6

Browse files
authored
Merge pull request #7 from pghmcfc/header-randomiv
Fix decryption of ciphertext created with 'header' => 'randomiv'
2 parents 524db90 + 160af60 commit 393fff6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/Crypt/CBC.pm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -661,7 +661,7 @@ sub _read_key_and_iv {
661661
croak "Ciphertext does not begin with a valid header for 'randomiv' header mode" unless defined $self->{iv};
662662
croak "randomiv header mode cannot be used securely when decrypting with a >8 byte block cipher.\n"
663663
unless $self->blocksize == 8;
664-
(undef,$self->{key}) = $self->pbkdf_obj->key_and_iv(undef,$self->{passphrase});
664+
($self->{key},undef) = $self->pbkdf_obj->key_and_iv(undef,$self->{passphrase});
665665
substr($$input_stream,0,16) = ''; # truncate
666666
}
667667

0 commit comments

Comments
 (0)