/** * @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)); }
/** * @dataProvider symmetricEncryptionProvider */ public function testSymmetricEncryption($plaintext, $key) { $ciphertext = fCryptography::symmetricKeyEncrypt($plaintext, $key); $this->assertNotEquals($plaintext, $ciphertext); $this->assertEquals($plaintext, fCryptography::symmetricKeyDecrypt($ciphertext, $key)); }