Modifier and Type | Method and Description |
---|---|
Algorithm |
getAlgorithm()
Return the algorithm supported by this signer.
|
String |
getKid()
Return the kid used for this signer.
|
static ECSigner |
newSHA256Signer(String privateKey)
Build a new EC signer using a SHA-256 hash.
|
static ECSigner |
newSHA256Signer(String privateKey,
CryptoProvider cryptoProvider)
Build a new EC signer using a SHA-256 hash.
|
static ECSigner |
newSHA256Signer(String privateKey,
String kid)
Build a new EC signer using a SHA-256 hash.
|
static ECSigner |
newSHA256Signer(String privateKey,
String kid,
CryptoProvider cryptoProvider)
Build a new EC signer using a SHA-256 hash.
|
static ECSigner |
newSHA384Signer(String privateKey)
Build a new EC signer using a SHA-384 hash.
|
static ECSigner |
newSHA384Signer(String privateKey,
CryptoProvider cryptoProvider)
Build a new EC signer using a SHA-384 hash.
|
static ECSigner |
newSHA384Signer(String privateKey,
String kid)
Build a new EC signer using a SHA-384 hash.
|
static ECSigner |
newSHA384Signer(String privateKey,
String kid,
CryptoProvider cryptoProvider)
Build a new EC signer using a SHA-384 hash.
|
static ECSigner |
newSHA512Signer(String privateKey)
Build a new EC signer using a SHA-512 hash.
|
static ECSigner |
newSHA512Signer(String privateKey,
CryptoProvider cryptoProvider)
Build a new EC signer using a SHA-512 hash.
|
static ECSigner |
newSHA512Signer(String privateKey,
String kid)
Build a new EC signer using a SHA-512 hash.
|
static ECSigner |
newSHA512Signer(String privateKey,
String kid,
CryptoProvider cryptoProvider)
Build a new EC signer using a SHA-512 hash.
|
byte[] |
sign(String message)
Sign the provided message and return the signature.
|
public static ECSigner newSHA256Signer(String privateKey, String kid)
privateKey
- The private key PEM expected to be in PKCS#1 or PKCS#8 format.kid
- The key identifier. This will be used by the JWTEncoder to write the 'kid' header.public static ECSigner newSHA256Signer(String privateKey, String kid, CryptoProvider cryptoProvider)
privateKey
- The private key PEM expected to be in PKCS#1 or PKCS#8 format.kid
- The key identifier. This will be used by the JWTEncoder to write the 'kid' header.cryptoProvider
- The crypto provider used to get the ECDSA Signature Algorithm.public static ECSigner newSHA256Signer(String privateKey)
privateKey
- The private key PEM expected to be in PKCS#1 or PKCS#8 format.public static ECSigner newSHA256Signer(String privateKey, CryptoProvider cryptoProvider)
privateKey
- The private key PEM expected to be in PKCS#1 or PKCS#8 format.cryptoProvider
- The crypto provider used to get the ECDSA Signature algorithm.public static ECSigner newSHA384Signer(String privateKey, String kid)
privateKey
- The private key PEM expected to be in PKCS#1 or PKCS#8 format.kid
- The key identifier. This will be used by the JWTEncoder to write the 'kid' header.public static ECSigner newSHA384Signer(String privateKey)
privateKey
- The private key PEM expected to be in PKCS#1 or PKCS#8 format.public static ECSigner newSHA384Signer(String privateKey, String kid, CryptoProvider cryptoProvider)
privateKey
- The private key PEM expected to be in PKCS#1 or PKCS#8 format.kid
- The key identifier. This will be used by the JWTEncoder to write the 'kid' header.cryptoProvider
- The crypto provider used to get the ECDSA Signature algorithm.public static ECSigner newSHA384Signer(String privateKey, CryptoProvider cryptoProvider)
privateKey
- The private key PEM expected to be in PKCS#1 or PKCS#8 format.cryptoProvider
- The crypto provider used to get the ECDSA Signature algorithm.public static ECSigner newSHA512Signer(String privateKey, String kid)
privateKey
- The private key PEM expected to be in PKCS#1 or PKCS#8 format.kid
- The key identifier. This will be used by the JWTEncoder to write the 'kid' header.public static ECSigner newSHA512Signer(String privateKey)
privateKey
- The private key PEM expected to be in PKCS#1 or PKCS#8 format.public static ECSigner newSHA512Signer(String privateKey, String kid, CryptoProvider cryptoProvider)
privateKey
- The private key PEM expected to be in PKCS#1 or PKCS#8 format.kid
- The key identifier. This will be used by the JWTEncoder to write the 'kid' header.cryptoProvider
- The crypto provider used to get the ECDSA Signature algorithm.public static ECSigner newSHA512Signer(String privateKey, CryptoProvider cryptoProvider)
privateKey
- The private key PEM expected to be in PKCS#1 or PKCS#8 format.cryptoProvider
- The crypto provider used to get the ECDSA Signature algorithm.public Algorithm getAlgorithm()
Signer
getAlgorithm
in interface Signer
public String getKid()
Signer
Copyright © 2021. All rights reserved.