diff options
author | Alexey Mazurin <mazurin.alexey@gmail.com> | 2015-12-29 16:42:10 +0400 |
---|---|---|
committer | Alexey Mazurin <mazurin.alexey@gmail.com> | 2015-12-29 16:42:10 +0400 |
commit | 81054c945a6ebf7a7d9d55a9393c76e3951b6766 (patch) | |
tree | 5897f4cea21dd5e7fa6c410ba1789b637433c478 /lib/Spreadsheet/ParseXLSX/Decryptor/Agile.pm | |
parent | 168bcad6db3dd76440f0390aeecd3cdd09839d3b (diff) | |
download | spreadsheet-parsexlsx-81054c945a6ebf7a7d9d55a9393c76e3951b6766.tar.gz spreadsheet-parsexlsx-81054c945a6ebf7a7d9d55a9393c76e3951b6766.zip |
missed pack("L", ...) in Agile.pm and Standard.pm
Diffstat (limited to 'lib/Spreadsheet/ParseXLSX/Decryptor/Agile.pm')
-rw-r--r-- | lib/Spreadsheet/ParseXLSX/Decryptor/Agile.pm | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/Spreadsheet/ParseXLSX/Decryptor/Agile.pm b/lib/Spreadsheet/ParseXLSX/Decryptor/Agile.pm index 87d73dc..b480c7a 100644 --- a/lib/Spreadsheet/ParseXLSX/Decryptor/Agile.pm +++ b/lib/Spreadsheet/ParseXLSX/Decryptor/Agile.pm @@ -23,7 +23,7 @@ sub _generateDecryptionKey { unless ($self->{pregeneratedKey}) { $hash = $self->{hashProc}->($self->{salt} . Encode::encode('UTF-16LE', $self->{password})); for (my $i = 0; $i < $self->{spinCount}; $i++) { - $hash = $self->{hashProc}->(pack('L', $i) . $hash); + $hash = $self->{hashProc}->(pack('V', $i) . $hash); } $self->{pregeneratedKey} = $hash; } @@ -68,7 +68,7 @@ sub decryptFile { my $i = 0; while (($fileSize > 0) && (my $inlen = $inFile->read($inbuf, $bufferLength))) { - my $blockId = pack('L', $i); + my $blockId = pack('V', $i); my $iv = $self->_generateInitializationVector($blockId, $self->{blockSize}); |