OXIESEC PANEL
- Current Dir:
/
/
var
/
www
/
reader
/
aws-ses
/
vendor
/
aws
/
aws-sdk-php
/
tests
/
Crypto
Server IP: 139.59.38.164
Upload:
Create Dir:
Name
Size
Modified
Perms
π
..
-
08/14/2024 10:55:48 AM
rwxr-xr-x
π
AesDecryptingStreamTest.php
4.66 KB
08/14/2024 10:52:39 AM
rw-r--r--
π
AesEncryptingStreamTest.php
5.62 KB
08/14/2024 10:52:39 AM
rw-r--r--
π
AesEncryptionStreamTestTrait.php
2.47 KB
08/14/2024 10:52:39 AM
rw-r--r--
π
AesGcmDecryptingStreamTest.php
4.74 KB
08/14/2024 10:52:39 AM
rw-r--r--
π
AesGcmEncryptingStreamTest.php
7.22 KB
08/14/2024 10:52:39 AM
rw-r--r--
π
Cipher
-
08/14/2024 10:55:44 AM
rwxr-xr-x
π
KmsMaterialsProviderTest.php
1.93 KB
08/14/2024 10:52:39 AM
rw-r--r--
π
KmsMaterialsProviderV2Test.php
7.24 KB
08/14/2024 10:52:39 AM
rw-r--r--
π
MetadataEnvelopeTest.php
1.23 KB
08/14/2024 10:52:39 AM
rw-r--r--
π
Polyfill
-
08/14/2024 10:55:45 AM
rwxr-xr-x
π
RandomByteStream.php
935 bytes
08/14/2024 10:52:39 AM
rw-r--r--
π
UsesCryptoParamsTrait.php
3.66 KB
08/14/2024 10:52:40 AM
rw-r--r--
π
UsesCryptoParamsTraitV2.php
2.69 KB
08/14/2024 10:52:40 AM
rw-r--r--
π
UsesMetadataEnvelopeTrait.php
2.53 KB
08/14/2024 10:52:40 AM
rw-r--r--
Editing: AesEncryptionStreamTestTrait.php
Close
<?php namespace Aws\Test\Crypto; use Aws\Crypto\Cipher\Cbc; use GuzzleHttp\Psr7; use GuzzleHttp\Psr7\CachingStream; trait AesEncryptionStreamTestTrait { public function cartesianJoinInputCipherMethodProvider() { $toReturn = []; $plainTexts = $this->unwrapProvider([$this, 'plainTextProvider']); $ivs = $this->unwrapProvider([$this, 'cipherMethodProvider']); for ($i = 0; $i < count($plainTexts); $i++) { for ($j = 0; $j < count($ivs); $j++) { $toReturn []= [$plainTexts[$i], clone $ivs[$j]]; } } return $toReturn; } public function cartesianJoinInputKeySizeProvider() { $toReturn = []; $plainTexts = $this->unwrapProvider([$this, 'plainTextProvider']); $keySizes = $this->unwrapProvider([$this, 'keySizeProvider']); for ($i = 0; $i < count($plainTexts); $i++) { for ($j = 0; $j < count($keySizes); $j++) { $toReturn []= [ $plainTexts[$i], $keySizes[$j], ]; } } return $toReturn; } public function cipherMethodProvider() { $toReturn = []; foreach ($this->unwrapProvider([$this, 'keySizeProvider']) as $keySize) { $toReturn []= [new Cbc( openssl_random_pseudo_bytes(openssl_cipher_iv_length('aes-256-cbc')), $keySize )]; } return $toReturn; } public function seekableCipherMethodProvider() { return array_filter($this->cipherMethodProvider(), function (array $args) { return !($args[0] instanceof Cbc); }); } public function keySizeProvider() { return [ [128], [192], [256], ]; } public function plainTextProvider() { return [ [Psr7\Utils::streamFor('The rain in Spain falls mainly on the plain.')], [Psr7\Utils::streamFor('Ψ―Ψ³ΨͺβΩΩΨ΄ΨͺΩβΩΨ§ ΩΩ ΫβΨ³ΩΨ²ΩΨ―')], [Psr7\Utils::streamFor('Π ΡΠΊΠΎΠΏΠΈΡΠΈ Π½Π΅ Π³ΠΎΡΡΡ')], [new CachingStream(new RandomByteStream(2 * 1024 * 1024 + 11))] ]; } private function unwrapProvider(callable $provider) { return array_map(function (array $wrapped) { return $wrapped[0]; }, call_user_func($provider)); } }