You are here

public function LockrAes256CbcSha256RawKeyWrapperTest::testReencryptsData in Lockr 7.3

File

vendor/lockr/lockr/tests/KeyWrapper/LockrAes256CbcSha256RawKeyWrapperTest.php, line 18

Class

LockrAes256CbcSha256RawKeyWrapperTest

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