src/Security/SignatureValidator.php
public function validate(RequestInterface $request, $secret)
    {
        $signature   = $request->getHeader('X-Hub-Signature');
        $requestBody = $request->getBody();
        $requestBody->rewind();

        $payload = $requestBody->getContents();

        if (!$this->validateSignature($signature, $payload, $secret)) {
            throw new InvalidGitHubRequestSignatureException($request, $signature);
        }
    }
public function validate(RequestInterface $request, $secret)
    {
        $signature   = $request->getHeader('X-Hub-Signature');
        $requestBody = $request->getBody();
        $requestBody->rewind();

        $payload = $requestBody->getContents();

        if (!$this->validateSignature($signature, $payload, $secret)) {
            throw new InvalidGitHubRequestSignatureException($request, $signature);
        }
    }
{@inheritdoc}