Skip to content

Commit

Permalink
fix encryption
Browse files Browse the repository at this point in the history
  • Loading branch information
Ne-Lexa committed Dec 7, 2019
1 parent f82a57e commit 725959d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/PhpZip/Crypto/TraditionalPkwareEncryptionEngine.php
Original file line number Diff line number Diff line change
Expand Up @@ -367,8 +367,8 @@ public function decrypt($content)
$byte = 0;

for ($i = 0; $i < self::STD_DEC_HDR_SIZE; $i++) {
$headerBytes[$i] = ($headerBytes[$i] ^ $this->decryptByte()) & 0xff;
$this->updateKeys($headerBytes[$i]);
$byte = ($headerBytes[$i] ^ $this->decryptByte()) & 0xff;
$this->updateKeys($byte);
}

if ($this->entry->getGeneralPurposeBitFlag(ZipEntry::GPBF_DATA_DESCRIPTOR)) {
Expand Down

0 comments on commit 725959d

Please sign in to comment.