private function signatureIsValid($httpMethod, $url, $publicKey, $privateKey, $timestamp, $signature) {
        // Generate data for the HMAC
        $data = $httpMethod . '|' . $url . '|' . $publicKey . '|' . $timestamp;

        // Compare
        if ($signature === hash_hmac($this->algorithm, $data, $privateKey)) {
            return true;
        }

        return false;
    }
private function signatureIsValid($httpMethod, $url, $publicKey, $privateKey, $timestamp, $signature) {
        // Generate data for the HMAC
        $data = $httpMethod . '|' . $url . '|' . $publicKey . '|' . $timestamp;

        // Compare
        if ($signature === hash_hmac($this->algorithm, $data, $privateKey)) {
            return true;
        }

        return false;
    }
private function signatureIsValid ( $ httpMethod , $ url , $ publicKey , $ privateKey , $ timestamp , $ signature ) { // Generate data for the HMAC $ data = $ httpMethod . '|' . $ url . '|' . $ publicKey . '|' . $ timestamp ; // Compare if ( $ signature === hash_hmac ( $ this -> algorithm , $ data , $ privateKey ) ) { return true ; } return false ; }
Check if the signature is valid

@param string $httpMethod The current HTTP method
@param string $url The accessed URL
@param string $publicKey The current public key
@param array  $privateKey The private key to sign the hash with
@param string $timestamp A valid timestamp
@param string $signature The signature to compare with
@return boolean
Check if the signature is valid