Example #1
0
 static function openTimestamp($timestamp = array(), $requester)
 {
     $me = new self($requester, 2048);
     $timestamp->timestamp = $me->decrypt($timestamp->timestamp);
     return $timestamp;
 }
Example #2
0
 /**
  * Unit test
  * @ignore
  */
 public static function __test()
 {
     $x = new self('abcdefghijklmnop');
     assert(base64_encode($x->encrypt('Hello')) == 'aCVjUPXOAknwRDyq');
     assert($x->decrypt(base64_decode('aCVjUPXOAknwRDyq')) == 'Hello');
 }