public function verifySignature(array $data)
    {
        $signedData = array_intersect_key($data, array_flip(self::$validResponseParams));
        ksort($signedData);

        $queryString = $this->buildQueryString($signedData);
        $signature = base64_encode(hash_hmac('sha1', $queryString, $this->clientSecret, true));

        return hash_equals($signature, $data['h']);
    }
public function verifySignature(array $data)
    {
        $signedData = array_intersect_key($data, array_flip(self::$validResponseParams));
        ksort($signedData);

        $queryString = $this->buildQueryString($signedData);
        $signature = base64_encode(hash_hmac('sha1', $queryString, $this->clientSecret, true));

        return hash_equals($signature, $data['h']);
    }
public function verifySignature ( array $ data ) { $ signedData = array_intersect_key ( $ data , array_flip ( self :: $ validResponseParams ) ) ; ksort ( $ signedData ) ; $ queryString = $ this -> buildQueryString ( $ signedData ) ; $ signature = base64_encode ( hash_hmac ( 'sha1' , $ queryString , $ this -> clientSecret , true ) ) ; return hash_equals ( $ signature , $ data [ 'h' ] ) ; }
Verifies that the signature in the 'h' key matches the expected signature.

@param array $data
@return bool
Verifies that the signature in the h key matches the expected signature .