Interface CipherMethod
Direct known implementers
Methods Summary
-
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.
-
requiresPadding ( )
Indicates whether the cipher method used with this IV requires padding the final block to make sure the plaintext is evenly divisible by the block size.
-
seek ( int $offset, int $whence = SEEK_SET )
Adjust the return of this::getCurrentIv to reflect a seek performed on the encryption stream using this IV object.
-
update ( string $cipherTextBlock )
Take account of the last cipher text block to adjust the return of this::getCurrentIv
Methods Details
string getOpenSslName ( )
Returns an identifier recognizable by openssl_*
functions, such as
aes-256-cbc
or aes-128-ctr
.
Returns
string |
string getAesName ( )
Returns an AES recognizable name, such as 'AES/GCM/NoPadding'.
Returns
string |
string getCurrentIv ( )
Returns the IV that should be used to initialize the next block in encrypt or decrypt.
Returns
string |
boolean requiresPadding ( )
Indicates whether the cipher method used with this IV requires padding the final block to make sure the plaintext is evenly divisible by the block size.
Returns
boolean |
seek ( integer $offset, integer $whence = SEEK_SET )
Adjust the return of this::getCurrentIv to reflect a seek performed on the encryption stream using this IV object.
Parameters
integer | $offset | |
integer | $whence = SEEK_SET |
Exceptions
LogicException Thrown if the requested seek is not supported by this IV implementation. For example, a CBC IV only supports a full rewind ($offset === 0 && $whence === SEEK_SET) |
update ( string $cipherTextBlock )
Take account of the last cipher text block to adjust the return of this::getCurrentIv
Parameters
string | $cipherTextBlock |