コード例 #1
0
ファイル: McryptTest.php プロジェクト: haoyanfei/zf2
 public function testEncryptWithoutPadding()
 {
     $this->mcrypt->setKey($this->key);
     $this->mcrypt->setSalt($this->salt);
     $this->setExpectedException('Zend\\Crypt\\Symmetric\\Exception\\InvalidArgumentException', 'You have to specify a padding method');
     $ciphertext = $this->mcrypt->encrypt($this->plaintext);
 }
コード例 #2
0
ファイル: McryptTest.php プロジェクト: rajanlamic/IntTest
 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);
 }