Horde_Token_Base::_isExpired PHP Method

_isExpired() private method

Has the nonce expired?
private _isExpired ( string $nonce, integer $timeout ) : boolean
$nonce string The to be checked for expiration.
$timeout integer The timeout that should be applied.
return boolean True if the nonce expired.
    private function _isExpired($nonce, $timeout)
    {
        $timestamp = unpack('N', substr($nonce, 0, 4));
        $timestamp = array_pop($timestamp);
        return $timeout >= 0 && time() - $timestamp - $timeout >= 0;
    }