|
cryptal
latest
Cryptography Abstraction Layer
|
Inheritance diagram for fpoirotte\Cryptal\Modes\GCM:Public Member Functions | |
| __construct (CryptoInterface $cipher, $iv, $tagLength) | |
| decrypt ($data, $context) | |
| encrypt ($data, $context) | |
Protected Member Functions | |
| gctr ($ICB, $X) | |
| ghash ($X) | |
| padIv () | |
Static Protected Member Functions | |
| static | inc ($X, $n) |
Protected Attributes | |
| $cipher | |
| Approved block cipher with a 128-bit block size. | |
| $iv | |
| Initialization Vector. | |
| $key | |
| Secret key. | |
| $table | |
| Pre-computation table for GF(2**128) | |
| $taglen | |
| Output tag length (in bytes) | |
| fpoirotte\Cryptal\Modes\GCM::__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 28 of file GCM.php.
References fpoirotte\Cryptal\Modes\GCM\$cipher, fpoirotte\Cryptal\Modes\GCM\$iv, fpoirotte\Cryptal\Implementers\CryptoInterface\encrypt(), and fpoirotte\Cryptal\Implementers\CryptoInterface\getBlockSize().
| fpoirotte\Cryptal\Modes\GCM::decrypt | ( | $data, | |
| $context | |||
| ) |
Decrypt some data.
| string | $data | Data to decrypt. |
| resource | $context | Stream context for the operation. |
Implements fpoirotte\Cryptal\AsymmetricModeInterface.
| fpoirotte\Cryptal\Modes\GCM::encrypt | ( | $data, | |
| $context | |||
| ) |
Encrypt some data.
| string | $data | Data to encrypt. |
| resource | $context | Stream context for the operation. |
Implements fpoirotte\Cryptal\SymmetricModeInterface.