cryptal  latest
Cryptography Abstraction Layer
ECB.php
1 <?php
2 
4 
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 }
__construct(CryptoInterface $cipher, $iv, $tagLength)
Definition: ECB.php:16
encrypt($data, $context)
Definition: ECB.php:21
$cipher
Implementation.
Definition: ECB.php:14
decrypt($data, $context)
Definition: ECB.php:26