cryptal
latest
Cryptography Abstraction Layer
Main Page
Classes
Files
File List
ECB.php
1
<?php
2
3
namespace
fpoirotte\Cryptal\Modes
;
4
5
use
fpoirotte\Cryptal\Implementers\CryptoInterface
;
6
use
fpoirotte\Cryptal\AsymmetricModeInterface
;
7
11
class
ECB
implements
AsymmetricModeInterface
12
{
14
protected
$cipher
;
15
16
public
function
__construct
(
CryptoInterface
$cipher
, $iv, $tagLength)
17
{
18
$this->cipher =
$cipher
;
19
}
20
21
public
function
encrypt
($data, $context)
22
{
23
return
$this->cipher->encrypt(
''
, $data);
24
}
25
26
public
function
decrypt
($data, $context)
27
{
28
return
$this->cipher->decrypt(
''
, $data);
29
}
30
}
CryptoInterface
fpoirotte\Cryptal\Modes\ECB
Definition:
ECB.php:11
fpoirotte\Cryptal\Modes\ECB\__construct
__construct(CryptoInterface $cipher, $iv, $tagLength)
Definition:
ECB.php:16
fpoirotte\Cryptal\Implementers\CryptoInterface
Definition:
CryptoInterface.php:13
fpoirotte\Cryptal\Modes\ECB\encrypt
encrypt($data, $context)
Definition:
ECB.php:21
fpoirotte\Cryptal\Modes
Definition:
CBC.php:3
AsymmetricModeInterface
fpoirotte\Cryptal\AsymmetricModeInterface
Definition:
AsymmetricModeInterface.php:11
fpoirotte\Cryptal\Modes\ECB\$cipher
$cipher
Implementation.
Definition:
ECB.php:14
fpoirotte\Cryptal\Modes\ECB\decrypt
decrypt($data, $context)
Definition:
ECB.php:26
src
Cryptal
Modes
ECB.php
Generated on Sat Sep 29 2018 22:22:05 for cryptal by
1.8.11