cryptal
latest
Cryptography Abstraction Layer
|
Public Member Functions | |
__construct (CryptoInterface $cipher, $iv, $tagLength) | |
decrypt ($data, $context) | |
encrypt ($data, $context) | |
Protected Member Functions | |
checkum ($M, $A) | |
incrementCounter ($c) | |
Increment the value of the counter by one. | |
Protected Attributes | |
$cipher | |
Cipher. | |
$L | |
Length parameter. | |
$M | |
Output tag length. | |
$nonce | |
Nonce. | |
fpoirotte\Cryptal\Modes\CCM::__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 25 of file CCM.php.
References fpoirotte\Cryptal\Modes\CCM\$cipher, fpoirotte\Cryptal\Modes\CCM\$L, fpoirotte\Cryptal\Modes\CCM\$M, and fpoirotte\Cryptal\Implementers\CryptoInterface\getBlockSize().
fpoirotte\Cryptal\Modes\CCM::decrypt | ( | $data, | |
$context | |||
) |
Decrypt some data.
string | $data | Data to decrypt. |
resource | $context | Stream context for the operation. |
Implements fpoirotte\Cryptal\AsymmetricModeInterface.
Definition at line 122 of file CCM.php.
References fpoirotte\Cryptal\Modes\CCM\$nonce, and fpoirotte\Cryptal\Modes\CCM\incrementCounter().
fpoirotte\Cryptal\Modes\CCM::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 104 of file CCM.php.
References fpoirotte\Cryptal\Modes\CCM\$nonce, and fpoirotte\Cryptal\Modes\CCM\incrementCounter().