class LockrAesCbcKeyWrapperTest in Lockr 7.3
Hierarchy
- class \Lockr\Tests\KeyWrapper\LockrAesCbcKeyWrapperTest extends \PHPUnit\Framework\TestCase
Expanded class hierarchy of LockrAesCbcKeyWrapperTest
File
- vendor/
lockr/ lockr/ tests/ KeyWrapper/ LockrAesCbcKeyWrapperTest.php, line 8
Namespace
Lockr\Tests\KeyWrapperView source
class LockrAesCbcKeyWrapperTest extends TestCase {
/**
* @requires function mcrypt_encrypt
*/
public function testEncryptsData() {
$text = 'abcd';
$data = KeyWrapper::encrypt($text);
$plaintext = KeyWrapper::decrypt($data['ciphertext'], $data['encoded']);
$this
->assertSame($text, $plaintext);
}
/**
* @requires function mcrypt_encrypt
*/
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);
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
LockrAesCbcKeyWrapperTest:: |
public | function | @requires function mcrypt_encrypt | |
LockrAesCbcKeyWrapperTest:: |
public | function | @requires function mcrypt_encrypt |