You are here

public function LockrAes256CbcSha256KeyWrapperTest::testReencryptsData in Lockr 7.3

File

vendor/lockr/lockr/tests/KeyWrapper/LockrAes256CbcSha256KeyWrapperTest.php, line 19

Class

LockrAes256CbcSha256KeyWrapperTest

Namespace

Lockr\Tests\KeyWrapper

Code

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