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

Public Member Functions

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

Protected Attributes

 $cipher
 Cipher.
 
 $iv
 Initialization Vector.
 

Detailed Description

Output Feedback mode

Definition at line 11 of file OFB.php.

Constructor & Destructor Documentation

fpoirotte\Cryptal\Modes\OFB::__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 19 of file OFB.php.

References fpoirotte\Cryptal\Modes\OFB\$cipher, fpoirotte\Cryptal\Modes\OFB\$iv, and fpoirotte\Cryptal\Implementers\CryptoInterface\getBlockSize().

Member Function Documentation

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

Encrypt some data.

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

Implements fpoirotte\Cryptal\SymmetricModeInterface.

Definition at line 31 of file OFB.php.


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