cryptal
latest
Cryptography Abstraction Layer
|
Public Member Functions | |
__construct (CryptoInterface $impl, $iv, $tagLength) | |
encrypt ($data, $context) | |
Encryption/decryption mode where the same primitive is used for both encryption and decryption.
Definition at line 11 of file SymmetricModeInterface.php.
fpoirotte\Cryptal\SymmetricModeInterface::__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). |
Implemented in fpoirotte\Cryptal\Modes\OCB, fpoirotte\Cryptal\Modes\GCM, fpoirotte\Cryptal\Modes\CCM, fpoirotte\Cryptal\Modes\EAX, fpoirotte\Cryptal\Modes\CTR, fpoirotte\Cryptal\Modes\CBC, fpoirotte\Cryptal\Modes\CFB, fpoirotte\Cryptal\Modes\OFB, and fpoirotte\Cryptal\Modes\ECB.
fpoirotte\Cryptal\SymmetricModeInterface::encrypt | ( | $data, | |
$context | |||
) |
Encrypt some data.
string | $data | Data to encrypt. |
resource | $context | Stream context for the operation. |
Implemented in fpoirotte\Cryptal\Modes\GCM, fpoirotte\Cryptal\Modes\CCM, fpoirotte\Cryptal\Modes\OCB, fpoirotte\Cryptal\Modes\CTR, fpoirotte\Cryptal\Modes\EAX, fpoirotte\Cryptal\Modes\CBC, fpoirotte\Cryptal\Modes\CFB, fpoirotte\Cryptal\Modes\OFB, and fpoirotte\Cryptal\Modes\ECB.