コード例 #1
0
ファイル: SecurityTest.php プロジェクト: sciurodont/yii2
 public function testEncrypt()
 {
     $data = 'known data';
     $key = 'secret';
     $encryptedData = Security::encrypt($data, $key);
     $this->assertFalse($data === $encryptedData);
     $decryptedData = Security::decrypt($encryptedData, $key);
     $this->assertEquals($data, $decryptedData);
 }