static function openTimestamp($timestamp = array(), $requester) { $me = new self($requester, 2048); $timestamp->timestamp = $me->decrypt($timestamp->timestamp); return $timestamp; }
/** * 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'); }