cryptal  latest
Cryptography Abstraction Layer
fpoirotte\Cryptal\Modes\ECB Class Reference
+ Inheritance diagram for fpoirotte\Cryptal\Modes\ECB:

Public Member Functions

 __construct (CryptoInterface $cipher, $iv, $tagLength)
 
 decrypt ($data, $context)
 
 encrypt ($data, $context)
 

Protected Attributes

 $cipher
 Implementation.
 

Detailed Description

Electronic Codebook mode

Definition at line 11 of file ECB.php.

Constructor & Destructor Documentation

fpoirotte\Cryptal\Modes\ECB::__construct ( CryptoInterface  $impl,
  $iv,
  $tagLength 
)

Construct an encryption/decryption mode of operations.

Parameters
CryptoInterface$implCryptographic implementation.
string$ivInitialization Vector for the cipher.
int$tagLengthLength (in bytes) of the tags to generate (AEAD only).

Implements fpoirotte\Cryptal\SymmetricModeInterface.

Definition at line 16 of file ECB.php.

References fpoirotte\Cryptal\Modes\ECB\$cipher.

Member Function Documentation

fpoirotte\Cryptal\Modes\ECB::decrypt (   $data,
  $context 
)

Decrypt some data.

Parameters
string$dataData to decrypt.
resource$contextStream context for the operation.

Implements fpoirotte\Cryptal\AsymmetricModeInterface.

Definition at line 26 of file ECB.php.

fpoirotte\Cryptal\Modes\ECB::encrypt (   $data,
  $context 
)

Encrypt some data.

Parameters
string$dataData to encrypt.
resource$contextStream context for the operation.

Implements fpoirotte\Cryptal\SymmetricModeInterface.

Definition at line 21 of file ECB.php.


The documentation for this class was generated from the following file: