public function sign(JWKInterface $key, $data)
{
$this->checkKey($key);
Assertion::true($key->has('d'), 'The EC key is not private');
if (defined('OPENSSL_KEYTYPE_EC')) {
return $this->getOpenSSLSignature($key, $data);
}
return $this->getPHPECCSignature($key, $data);
}