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