PluginProbe
Media Cloud Sync / 1.4.2
Media Cloud Sync v1.4.2
1.4.2 1.4.1 1.4.0 1.3.12 1.3.11 1.3.10 trunk 1.0.0 1.0.1 1.0.2 1.0.3 1.1.0 1.1.1 1.2.0 1.2.10 1.2.11 1.2.12 1.2.13 1.2.2 1.2.3 1.2.4 1.2.5 1.2.6 1.2.7 1.2.8 All 36 releases
← All changes | includes/sdk/s3/Aws/Crypto/AesGcmEncryptingStream.php +1 -8 1.2.13 → 1.4.2 View file →
@@ -1,14 +1,11 @@
1 1 <?php
2 2
3 3 namespace Dudlewebs\WPMCS\s3\Aws\Crypto;
4 4
5 -use Dudlewebs\WPMCS\s3\Aws\Crypto\Polyfill\AesGcm;
6 -use Dudlewebs\WPMCS\s3\Aws\Crypto\Polyfill\Key;
7 5 use Dudlewebs\WPMCS\s3\GuzzleHttp\Psr7;
8 6 use Dudlewebs\WPMCS\s3\GuzzleHttp\Psr7\StreamDecoratorTrait;
9 7 use Dudlewebs\WPMCS\s3\Psr\Http\Message\StreamInterface;
10 -use RuntimeException;
11 8 /**
12 9 * @internal Represents a stream of data to be gcm encrypted.
13 10 */
14 11 class AesGcmEncryptingStream implements AesStreamInterface, AesStreamInterfaceV2
@@ -73,13 +70,9 @@
73 70 return $this->initializationVector;
74 71 }
75 72 public function createStream()
76 73 {
77 - if (\version_compare(\PHP_VERSION, '7.1', '<')) {
78 - return Psr7\Utils::streamFor(AesGcm::encrypt((string) $this->plaintext, $this->initializationVector, new Key($this->key), $this->aad, $this->tag, $this->keySize));
79 - } else {
80 - return Psr7\Utils::streamFor(\openssl_encrypt((string) $this->plaintext, $this->getOpenSslName(), $this->key, \OPENSSL_RAW_DATA, $this->initializationVector, $this->tag, $this->aad, $this->tagLength));
81 - }
74 + return Psr7\Utils::streamFor(\openssl_encrypt((string) $this->plaintext, $this->getOpenSslName(), $this->key, \OPENSSL_RAW_DATA, $this->initializationVector, $this->tag, $this->aad, $this->tagLength));
82 75 }
83 76 /**
84 77 * @return string
85 78 */