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);
}