public function LockrAesCbcKeyWrapperTest::testReencryptsData in Lockr 7.3
@requires function mcrypt_encrypt
File
- vendor/
lockr/ lockr/ tests/ KeyWrapper/ LockrAesCbcKeyWrapperTest.php, line 24
Class
Namespace
Lockr\Tests\KeyWrapperCode
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);
}