1
0
mirror of https://github.com/Ne-Lexa/php-zip.git synced 2025-08-23 23:42:49 +02:00

fix encryption

This commit is contained in:
wapplay
2019-12-07 19:40:36 +03:00
parent f82a57e662
commit 725959d98f

View File

@@ -367,8 +367,8 @@ class TraditionalPkwareEncryptionEngine implements ZipEncryptionEngine
$byte = 0; $byte = 0;
for ($i = 0; $i < self::STD_DEC_HDR_SIZE; $i++) { for ($i = 0; $i < self::STD_DEC_HDR_SIZE; $i++) {
$headerBytes[$i] = ($headerBytes[$i] ^ $this->decryptByte()) & 0xff; $byte = ($headerBytes[$i] ^ $this->decryptByte()) & 0xff;
$this->updateKeys($headerBytes[$i]); $this->updateKeys($byte);
} }
if ($this->entry->getGeneralPurposeBitFlag(ZipEntry::GPBF_DATA_DESCRIPTOR)) { if ($this->entry->getGeneralPurposeBitFlag(ZipEntry::GPBF_DATA_DESCRIPTOR)) {