You are here

public function LockrAesCbcKeyWrapperTest::testEncryptsData in Lockr 7.3

@requires function mcrypt_encrypt

File

vendor/lockr/lockr/tests/KeyWrapper/LockrAesCbcKeyWrapperTest.php, line 13

Class

LockrAesCbcKeyWrapperTest

Namespace

Lockr\Tests\KeyWrapper

Code

public function testEncryptsData() {
  $text = 'abcd';
  $data = KeyWrapper::encrypt($text);
  $plaintext = KeyWrapper::decrypt($data['ciphertext'], $data['encoded']);
  $this
    ->assertSame($text, $plaintext);
}