handler; } /** * 获取加密后的Token * @param string $token Token标识 * @return string */ protected function getEncryptedToken(string $token): string { return hash_hmac($this->config['hash_algo'], $token, $this->config['key']); } /** * 获取过期剩余时长 * @param $expiretime * @return float|int|mixed */ protected function getExpiredIn($expire_time) { return $expire_time ? max(0, $expire_time - time()) : 365 * 86400; } }