src/Authenticator/HttpDigestAuthenticator.php
protected function validNonce($nonce)
    {
        $value = base64_decode($nonce);
        if ($value === false) {
            return false;
        }
        $parts = explode(':', $value);
        if (count($parts) !== 2) {
            return false;
        }
        list($expires, $checksum) = $parts;
        if ($expires < microtime(true)) {
            return false;
        }
        $secret = $this->getConfig('secret');
        $check = hash_hmac('sha1', $expires . ':' . $secret, $secret);

        return hash_equals($check, $checksum);
    }
protected function validNonce($nonce)
    {
        $value = base64_decode($nonce);
        if ($value === false) {
            return false;
        }
        $parts = explode(':', $value);
        if (count($parts) !== 2) {
            return false;
        }
        list($expires, $checksum) = $parts;
        if ($expires < microtime(true)) {
            return false;
        }
        $secret = $this->getConfig('secret');
        $check = hash_hmac('sha1', $expires . ':' . $secret, $secret);

        return hash_equals($check, $checksum);
    }
protected function validNonce ( $ nonce ) { $ value = base64_decode ( $ nonce ) ; if ( $ value === false ) { return false ; } $ parts = explode ( ':' , $ value ) ; if ( count ( $ parts ) !== 2 ) { return false ; } list ( $ expires , $ checksum ) = $ parts ; if ( $ expires < microtime ( true ) ) { return false ; } $ secret = $ this -> getConfig ( 'secret' ) ; $ check = hash_hmac ( 'sha1' , $ expires . ':' . $ secret , $ secret ) ; return hash_equals ( $ check , $ checksum ) ; }
Check the nonce to ensure it is valid and not expired.

@param string $nonce The nonce value to check.
@return bool
Check the nonce to ensure it is valid and not expired .