lib/GitHub/Event/Payload.php
private function _checkSignature(): bool
    {
        $secret           = $this->getSecret();
        $httpHubSignature = $this->serverBag->get('HTTP_X_HUB_SIGNATURE');

        if (null !== $secret) {
            if ($httpHubSignature) {
                /**
                 * Split signature into algorithm and hash
                 *
                 * @link http://isometriks.com/verify-github-webhooks-with-php
                 */
                list(, $hash) = explode('=', $httpHubSignature, 2);

                return $secret == $hash;
            }

            throw new BadSignatureException('HTTP header "X-Hub-Signature" is missing.');
        }

        return true;
    }
private function _checkSignature(): bool
    {
        $secret           = $this->getSecret();
        $httpHubSignature = $this->serverBag->get('HTTP_X_HUB_SIGNATURE');

        if (null !== $secret) {
            if ($httpHubSignature) {
                /**
                 * Split signature into algorithm and hash
                 *
                 * @link http://isometriks.com/verify-github-webhooks-with-php
                 */
                list(, $hash) = explode('=', $httpHubSignature, 2);

                return $secret == $hash;
            }

            throw new BadSignatureException('HTTP header "X-Hub-Signature" is missing.');
        }

        return true;
    }
private function _checkSignature ( ) : bool { $ secret = $ this -> getSecret ( ) ; $ httpHubSignature = $ this -> serverBag -> get ( 'HTTP_X_HUB_SIGNATURE' ) ; if ( null !== $ secret ) { if ( $ httpHubSignature ) { /**
                 * Split signature into algorithm and hash
                 *
                 * @link http://isometriks.com/verify-github-webhooks-with-php
                 */ list ( , $ hash ) = explode ( '=' , $ httpHubSignature , 2 ) ; return $ secret == $ hash ; } throw new BadSignatureException ( 'HTTP header "X-Hub-Signature" is missing.' ) ; } return true ; }
Check X-Hub-Signature

@throws BadSignatureException
@return bool
Check X - Hub - Signature