/home/techb158/immovalet.com/vendor/aws/aws-sdk-php/src/Crypto
NameSizeModeActions
Cipher/-0755rm
Polyfill/-0755rm
AbstractCryptoClient.php40840644editdlrm
AbstractCryptoClientV2.php39730644editdlrm
AesDecryptingStream.php35080644editdlrm
AesEncryptingStream.php37110644editdlrm
AesGcmDecryptingStream.php25700644editdlrm
AesGcmEncryptingStream.php27670644editdlrm
AesStreamInterface.php6560644editdlrm
AesStreamInterfaceV2.php7280644editdlrm
DecryptionTrait.php61020644editdlrm
DecryptionTraitV2.php92590644editdlrm
EncryptionTrait.php70320644editdlrm
EncryptionTraitV2.php72170644editdlrm
KmsMaterialsProvider.php39890644editdlrm
KmsMaterialsProviderV2.php35140644editdlrm
MaterialsProvider.php33050644editdlrm
MaterialsProviderInterface.php18510644editdlrm
MaterialsProviderInterfaceV2.php17130644editdlrm
MaterialsProviderV2.php20550644editdlrm
MetadataEnvelope.php15810644editdlrm
MetadataStrategyInterface.php9960644editdlrm
Edit: /home/techb158/immovalet.com/vendor/aws/aws-sdk-php/src/Crypto/AesEncryptingStream.php (3711B)
stream = $plainText; $this->key = $key; $this->cipherMethod = clone $cipherMethod; } public function getOpenSslName() { return $this->cipherMethod->getOpenSslName(); } public function getAesName() { return $this->cipherMethod->getAesName(); } public function getCurrentIv() { return $this->cipherMethod->getCurrentIv(); } public function getSize() { $plainTextSize = $this->stream->getSize(); if ($this->cipherMethod->requiresPadding() && $plainTextSize !== null) { // PKCS7 padding requires that between 1 and self::BLOCK_SIZE be // added to the plaintext to make it an even number of blocks. $padding = self::BLOCK_SIZE - $plainTextSize % self::BLOCK_SIZE; return $plainTextSize + $padding; } return $plainTextSize; } public function isWritable() { return false; } public function read($length) { if ($length > strlen($this->buffer)) { $this->buffer .= $this->encryptBlock( self::BLOCK_SIZE * ceil(($length - strlen($this->buffer)) / self::BLOCK_SIZE) ); } $data = substr($this->buffer, 0, $length); $this->buffer = substr($this->buffer, $length); return $data ? $data : ''; } public function seek($offset, $whence = SEEK_SET) { if ($whence === SEEK_CUR) { $offset = $this->tell() + $offset; $whence = SEEK_SET; } if ($whence === SEEK_SET) { $this->buffer = ''; $wholeBlockOffset = (int) ($offset / self::BLOCK_SIZE) * self::BLOCK_SIZE; $this->stream->seek($wholeBlockOffset); $this->cipherMethod->seek($wholeBlockOffset); $this->read($offset - $wholeBlockOffset); } else { throw new LogicException('Unrecognized whence.'); } } private function encryptBlock($length) { if ($this->stream->eof()) { return ''; } $plainText = ''; do { $plainText .= $this->stream->read($length - strlen($plainText)); } while (strlen($plainText) < $length && !$this->stream->eof()); $options = OPENSSL_RAW_DATA; if (!$this->stream->eof() || $this->stream->getSize() !== $this->stream->tell() ) { $options |= OPENSSL_ZERO_PADDING; } $cipherText = openssl_encrypt( $plainText, $this->cipherMethod->getOpenSslName(), $this->key, $options, $this->cipherMethod->getCurrentIv() ); $this->cipherMethod->update($cipherText); return $cipherText; } }