cryptal
latest
Cryptography Abstraction Layer
|
Public Member Functions | |
__construct (CryptoInterface $cipher, $iv, $tagLength) | |
encrypt ($data, $context) | |
Protected Member Functions | |
incrementCounter () | |
Increment the value of the counter by one. | |
Protected Attributes | |
$blockSize | |
Cipher block size. | |
$cipher | |
Cipher. | |
$counter | |
Counter. | |
fpoirotte\Cryptal\Modes\CTR::__construct | ( | CryptoInterface | $impl, |
$iv, | |||
$tagLength | |||
) |
Construct an encryption/decryption mode of operations.
CryptoInterface | $impl | Cryptographic implementation. |
string | $iv | Initialization Vector for the cipher. |
int | $tagLength | Length (in bytes) of the tags to generate (AEAD only). |
Implements fpoirotte\Cryptal\SymmetricModeInterface.
Definition at line 22 of file CTR.php.
References fpoirotte\Cryptal\Modes\CTR\$blockSize, fpoirotte\Cryptal\Modes\CTR\$cipher, and fpoirotte\Cryptal\Implementers\CryptoInterface\getBlockSize().
fpoirotte\Cryptal\Modes\CTR::encrypt | ( | $data, | |
$context | |||
) |
Encrypt some data.
string | $data | Data to encrypt. |
resource | $context | Stream context for the operation. |
Implements fpoirotte\Cryptal\SymmetricModeInterface.
Definition at line 46 of file CTR.php.
References fpoirotte\Cryptal\Modes\CTR\incrementCounter().