You are here

public function LockrAes128CtrSha256KeyWrapperTest::testEncryptsData in Lockr 7.3

File

vendor/lockr/lockr/tests/KeyWrapper/LockrAes128CtrSha256KeyWrapperTest.php, line 10

Class

LockrAes128CtrSha256KeyWrapperTest

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);
}