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

sign() public method

public sign ( Jose\Object\JWKInterface $key, $data )
$key Jose\Object\JWKInterface
    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);
    }