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')); }
private function package() { $parts = array(self::$myVersion, time(), $this->userId); $cookie = implode(self::$glue, $parts); return SEncryption::encrypt($cookie); }