public function verifyClientNonce($cnonce)
    {
        $cnonce_cache_key = 'cnonce__'.$cnonce;

        if (empty($this->cache)) {
            return;
        }

        $cnonce_data = $this->cache->get($cnonce_cache_key);
        if ($cnonce_data == 'USED') {
            throw new NonceException('That nonce has already been used');
        }

        $this->cache->add($cnonce_cache_key, 'USED');
    }
public function verifyClientNonce($cnonce)
    {
        $cnonce_cache_key = 'cnonce__'.$cnonce;

        if (empty($this->cache)) {
            return;
        }

        $cnonce_data = $this->cache->get($cnonce_cache_key);
        if ($cnonce_data == 'USED') {
            throw new NonceException('That nonce has already been used');
        }

        $this->cache->add($cnonce_cache_key, 'USED');
    }
public function verifyClientNonce ( $ cnonce ) { $ cnonce_cache_key = 'cnonce__' . $ cnonce ; if ( empty ( $ this -> cache ) ) { return ; } $ cnonce_data = $ this -> cache -> get ( $ cnonce_cache_key ) ; if ( $ cnonce_data == 'USED' ) { throw new NonceException ( 'That nonce has already been used' ) ; } $ this -> cache -> add ( $ cnonce_cache_key , 'USED' ) ; }
Verifies and stores a client nonce.

Throws a NonceException if the nonce does not verify (has been used).

@param string $cnonce The client nonce key.

@throws NonceException
Verifies and stores a client nonce .