コード例 #1
0
 function testBasic()
 {
     $cryptText = SEncryption::encrypt('text to encrypt');
     $this->assertEqual('text to encrypt', SEncryption::decrypt($cryptText));
     $this->assertNotEqual(SEncryption::encrypt('another text to encrypt'), SEncryption::encrypt('another text to encrypt'));
 }
コード例 #2
0
ファイル: cookie.php プロジェクト: BackupTheBerlios/stato-svn
 private function unpackage($cookie)
 {
     $buffer = SEncryption::decrypt($cookie);
     list($this->version, $this->created, $this->userId) = explode(self::$glue, $buffer);
 }