Beispiel #1
0
 /**
  * Build a new instance of the DES mixing function
  *
  * @param Factory $factory The optional encryption factory to use
  *
  * @return void
  */
 public function __construct(\CryptLib\Cipher\Factory $factory = null)
 {
     if (is_null($factory)) {
         $factory = new CipherFactory();
     }
     $this->cipher = $factory->getBlockCipher($this->cipher);
 }
Beispiel #2
0
 /**
  * @expectedException RuntimeException
  */
 public function testGetModeFail()
 {
     $factory = new Factory();
     $des = new \CryptLib\Cipher\Block\Cipher\DES('des');
     $factory->getMode('blah', $des, 'foobarba', array());
 }