cryptal  latest
Cryptography Abstraction Layer
RegistryWrapper.php
1 <?php
2 
3 namespace fpoirotte\Cryptal;
4 
11 
13 {
14  private $registry;
15  private $packageName;
16 
17  public function __construct(Registry $registry, $packageName)
18  {
19  $this->registry = $registry;
20  $this->packageName = $packageName;
21  }
22 
23  public function addCipher($cls, CipherEnum $algo, ModeEnum $mode, ImplementationTypeEnum $type)
24  {
25  $this->registry->addCipher($this->packageName, $cls, $algo, $mode, $type);
26  }
27 
28  public function addHash($cls, HashEnum $algo, ImplementationTypeEnum $type)
29  {
30  $this->registry->addHash($this->packageName, $cls, $algo, $type);
31  }
32 
33  public function addMac($cls, MacEnum $algo, ImplementationTypeEnum $type)
34  {
35  $this->registry->addMac($this->packageName, $cls, $algo, $type);
36  }
37 }