Class AesDecryptingStream
- Aws\Crypto\AesDecryptingStream implements Aws\Crypto\AesStreamInterface uses GuzzleHttp\Psr7\StreamDecoratorTrait
- Namespace: Aws\Crypto
- Located at Crypto/AesDecryptingStream.php
Methods Summary
- __construct ( Psr\Http\Message\StreamInterface $cipherText, string $key, Aws\Crypto\Cipher\CipherMethod $cipherMethod )
-
getOpenSslName ( )
Returns an identifier recognizable by
openssl_*
functions, such asaes-256-cbc
oraes-128-ctr
. -
getAesName ( )
Returns an AES recognizable name, such as 'AES/GCM/NoPadding'.
-
getCurrentIv ( )
Returns the IV that should be used to initialize the next block in encrypt or decrypt.
-
getSize ( )
Get the size of the stream if known.
-
isWritable ( )
Returns whether or not the stream is writable.
-
read ( int $length )
Read data from the stream.
-
seek ( int $offset, int $whence = SEEK_SET )
Seek to a position in the stream.
Methods inherited from Psr\Http\Message\StreamInterface
__toString()
,
close()
,
detach()
,
eof()
,
getContents()
,
getMetadata()
,
isReadable()
,
isSeekable()
,
rewind()
,
tell()
,
write()
Methods used from GuzzleHttp\Psr7\StreamDecoratorTrait
Methods Details
__construct (
Psr\Http\Message\StreamInterface
$cipherText,
string
$key,
Aws\Crypto\Cipher\CipherMethod
$cipherMethod
)
Parameters
Psr\Http\Message\StreamInterface |
$cipherText | |
string | $key | |
Aws\Crypto\Cipher\CipherMethod |
$cipherMethod |
string getOpenSslName ( )
Returns an identifier recognizable by openssl_*
functions, such as
aes-256-cbc
or aes-128-ctr
.
Returns
string |
Implementation of
string getAesName ( )
Returns an AES recognizable name, such as 'AES/GCM/NoPadding'.
Returns
string |
Implementation of
string getCurrentIv ( )
Returns the IV that should be used to initialize the next block in encrypt or decrypt.
Returns
string |
Implementation of
integer|null getSize ( )
Get the size of the stream if known.
Returns
integer|null Returns the size in bytes if known, or null if unknown. |
Implementation of
boolean isWritable ( )
Returns whether or not the stream is writable.
Returns
boolean |
Implementation of
string read ( integer $length )
Read data from the stream.
Parameters
integer | $length | Read up to $length bytes from the object and return them. Fewer than $length bytes may be returned if underlying stream call returns fewer bytes. |
Returns
string Returns the data read from the stream, or an empty string if no bytes are available. |
Exceptions
RuntimeException if an error occurs. |
Implementation of
seek ( integer $offset, integer $whence = SEEK_SET )
Seek to a position in the stream.
Parameters
integer | $offset | Stream offset |
integer | $whence = SEEK_SET | Specifies how the cursor position will be calculated
based on the seek offset. Valid values are identical to the built-in
PHP $whence values for |
Exceptions
RuntimeException on failure. |
Link
Implementation of
Constants summary
integer |
BLOCK_SIZE
|
#
16
|