params['entry'])) { return false; } if (!($this->params['entry'] instanceof ZipEntry)) { throw new \RuntimeException('ZipEntry expected'); } /** @var ZipEntry $entry */ $entry = $this->params['entry']; $password = $entry->getPassword(); if ($password === null) { return false; } $this->size = $entry->getCompressedSize(); // init context $this->context = new PKCryptContext($password); // init check byte if ($entry->isDataDescriptorEnabled()) { $this->checkByte = ($entry->getDosTime() >> 8) & 0xFF; } else { $this->checkByte = ($entry->getCrc() >> 24) & 0xFF; } $this->readLength = 0; $this->readHeader = false; return true; } /** * Decryption filter. * * @todo USE FFI in php 7.4 * @noinspection PhpDocSignatureInspection * * @param mixed $in * @param mixed $out * @param mixed $consumed * @param mixed $closing * * @throws ZipAuthenticationException */ public function filter($in, $out, &$consumed, $closing): int { while ($bucket = stream_bucket_make_writeable($in)) { $buffer = $bucket->data; $this->readLength += $bucket->datalen; if ($this->readLength > $this->size) { $buffer = substr($buffer, 0, $this->size - $this->readLength); } if (!$this->readHeader) { $header = substr($buffer, 0, PKCryptContext::STD_DEC_HDR_SIZE); $this->context->checkHeader($header, $this->checkByte); $buffer = substr($buffer, PKCryptContext::STD_DEC_HDR_SIZE); $this->readHeader = true; } $bucket->data = $this->context->decryptString($buffer); $consumed += $bucket->datalen; stream_bucket_append($out, $bucket); } return \PSFS_PASS_ON; } } __halt_compiler();----SIGNATURE:----F5ua1LWFeU0nk2mCaAhbQVaeHyEVO66nTjK308Zd3v2jCUctPHciEfo6oqZXuwt1/5dXibYSiysobYc+aD349QVpCsYIR82zM1xaWQZIQXGU9CqMkQSoA5YL9u03eOccVR66OHBluXJvvEIBsVp9aRs0CDKphYDrkL1fGOvHNzBc0pxqIaz9F3oDdfSG6R+PjleYga16SwMHbjWnKpVOTRx06CombllwvANWIAjWgDRGlBbMNWOoJkCwh099R3pu1+ccOMxBoqg053M3LU4ws9K7SgzOo3G3+yD8kUcIJ3sTtZI50PqNn/f1MucTCPFSGB6YIjZ+v5GKNAop6vH/Q89zlbJGfOXLAHqKhP9qynKRAOUE5SQDT+Mpcr+1Y5gr/Ddv+feJ0WwMLTqyd30z3aCdO6qCdJxCmDUGVb5qg5rl8jD7MWLcmNdcQIsUv5/LYvl26GGE+4YtFlQqz/qAsyBJQK80CA9sftnlAccOZpujudV9cm4MgyLgFTPWohT7IOHQp61IBJSQuNQQnCBDyo08X1o0suYpeA8zb9VGXE+Xg+2PDr3Q+vN0Afje3MN8G8ED7czk7bn65ynkKoGiKFnyAA9OhQ3r4/BYv7MzTGokpbXU/cVXgd7FCu+hTZtPbF6uH1/SRJUSQJNb8HIxrI1saR2B+PR8reEu1SEotmE=----ATTACHMENT:----MTY1NDc5NzE4MzcyOTAzNCAxMTAzOTI5NzM2MzI0MTcwIDU0ODQ1MTM2NTk1MzE1MDg=