Ejemplo n.º 1
0
 public function testDecryptWihoutPadding()
 {
     $this->mcrypt->setKey($this->key);
     $this->setExpectedException('Zend\Crypt\Symmetric\Exception\InvalidArgumentException',
                                 'You have to specify a padding method');
     $this->mcrypt->decrypt($this->plaintext);
 }
Ejemplo n.º 2
0
 public function testEncryptWihoutSalt()
 {
     $this->mcrypt->setKey($this->key);
     $this->setExpectedException('Zend\\Crypt\\Symmetric\\Exception\\InvalidArgumentException', 'The salt (IV) cannot be empty');
     $ciphertext = $this->mcrypt->encrypt($this->plaintext);
 }