src/Core.php
/**
     * Check if the provided data has the correct signature.
     * @param array $data - the data we recieved that was signed. The signature MUST NOT be in this
     *                      array.
     * @param string $signature - the signature that came with the data. This is what we will check
     *                            if is valid for the data recieved.
     * @return bool - true if the signature is correct for the data, or false if not (in which case
     *                a user probably tried to manipulate the data).
     */
Check if the provided data has the correct signature.
@param array $data - the data we recieved that was signed. The signature MUST NOT be in this
array.
@param string $signature - the signature that came with the data. This is what we will check
if is valid for the data recieved.
@return bool - true if the signature is correct for the data, or false if not (in which case
a user probably tried to manipulate the data).
Check if the provided data has the correct signature . @param array $data - the data we recieved that was signed . The signature MUST NOT be in this array . @param string $signature - the signature that came with the data . This is what we will check if is valid for the data recieved . @return bool - true if the signature is correct for the data or false if not ( in which case a user probably tried to manipulate the data ) .
public static function isValidSignedRequest(array $data, string $signature)
    {
        $generated_signature = SiteSpecific::generateSignature($data);
        return ($generated_signature == $signature);
    }
public static function isValidSignedRequest ( array $ data , string $ signature ) { $ generated_signature = SiteSpecific :: generateSignature ( $ data ) ; return ( $ generated_signature == $ signature ) ; }
Check if the provided data has the correct signature.
Check if the provided data has the correct signature .