/** * 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); }
/** * @expectedException RuntimeException */ public function testGetModeFail() { $factory = new Factory(); $des = new \CryptLib\Cipher\Block\Cipher\DES('des'); $factory->getMode('blah', $des, 'foobarba', array()); }