Java源码示例:com.nimbusds.jose.jwk.ECKey
示例1/**
* Sign JWS object with a given private key.
*
* @param jws object to be signed
* @param key key to sign object with
* @throws JOSEException invalid key provided
*/
public static void signJwt(JWSObject jws, ECPrivateKey key) throws JOSEException {
jws.sign(new ECDSASigner(key, ECKey.Curve.P_384));
}