/**
  * @dataProvider symmetricEncryptionProvider
  */
 public function testSymmetricEncryption($plaintext, $key)
 {
     if (!extension_loaded('mcrypt')) {
         $this->markTestSkipped();
     }
     $ciphertext = fCryptography::symmetricKeyEncrypt($plaintext, $key);
     $this->assertNotEquals($plaintext, $ciphertext);
     $this->assertEquals($plaintext, fCryptography::symmetricKeyDecrypt($ciphertext, $key));
 }
Exemplo n.º 2
0
 /**
  * @dataProvider symmetricEncryptionProvider
  */
 public function testSymmetricEncryption($plaintext, $key)
 {
     $ciphertext = fCryptography::symmetricKeyEncrypt($plaintext, $key);
     $this->assertNotEquals($plaintext, $ciphertext);
     $this->assertEquals($plaintext, fCryptography::symmetricKeyDecrypt($ciphertext, $key));
 }