Jose\Algorithm\Signature\ECDSA::verifyPHPECCSignature PHP Method

verifyPHPECCSignature() private method

private verifyPHPECCSignature ( Jose\Object\JWKInterface $key, string $data, string $R, string $S ) : boolean
$key Jose\Object\JWKInterface
$data string
$R string
$S string
return boolean
    private function verifyPHPECCSignature(JWKInterface $key, $data, $R, $S)
    {
        $p = $this->getGenerator();
        $x = $this->convertBase64ToGmp($key->get('x'));
        $y = $this->convertBase64ToGmp($key->get('y'));
        $hash = $this->convertHexToGmp(hash($this->getHashAlgorithm(), $data));
        $public_key = $p->getPublicKeyFrom($x, $y);
        $signer = EccFactory::getSigner();
        return $signer->verify($public_key, new Signature($this->convertHexToGmp($R), $this->convertHexToGmp($S)), $hash);
    }