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 RSAPSSSigner |
newSHA256Signer(String privateKey)
Build a new RSA signer using a SHA-256 hash.
|
static RSAPSSSigner |
newSHA256Signer(String privateKey,
CryptoProvider cryptoProvider)
Build a new RSA signer using a SHA-256 hash.
|
static RSAPSSSigner |
newSHA256Signer(String privateKey,
String kid)
Build a new RSA signer using a SHA-256 hash.
|
static RSAPSSSigner |
newSHA256Signer(String privateKey,
String kid,
CryptoProvider cryptoProvider)
Build a new RSA signer using a SHA-256 hash.
|
static RSAPSSSigner |
newSHA384Signer(String privateKey)
Build a new RSA signer using a SHA-384 hash.
|
static RSAPSSSigner |
newSHA384Signer(String privateKey,
CryptoProvider cryptoProvider)
Build a new RSA signer using a SHA-384 hash.
|
static RSAPSSSigner |
newSHA384Signer(String privateKey,
String kid)
Build a new RSA signer using a SHA-384 hash.
|
static RSAPSSSigner |
newSHA384Signer(String privateKey,
String kid,
CryptoProvider cryptoProvider)
Build a new RSA signer using a SHA-384 hash.
|
static RSAPSSSigner |
newSHA512Signer(String privateKey)
Build a new RSA signer using a SHA-512 hash.
|
static RSAPSSSigner |
newSHA512Signer(String privateKey,
CryptoProvider cryptoProvider)
Build a new RSA signer using a SHA-512 hash.
|
static RSAPSSSigner |
newSHA512Signer(String privateKey,
String kid)
Build a new RSA signer using a SHA-512 hash.
|
static RSAPSSSigner |
newSHA512Signer(String privateKey,
String kid,
CryptoProvider cryptoProvider)
Build a new RSA signer using a SHA-512 hash.
|
byte[] |
sign(String message)
Sign the provided message and return the signature.
|
public static RSAPSSSigner 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 RSAPSSSigner newSHA256Signer(String privateKey)
privateKey
- The private key PEM expected to be in PKCS#1 or PKCS#8 format.public static RSAPSSSigner 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 RSA signature Algorithm.public static RSAPSSSigner 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 RSA signature Algorithm.public static RSAPSSSigner 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 RSAPSSSigner newSHA384Signer(String privateKey)
privateKey
- The private key PEM expected to be in PKCS#1 or PKCS#8 format.public static RSAPSSSigner 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 RSA signature Algorithm.public static RSAPSSSigner 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 RSA signature Algorithm.public static RSAPSSSigner 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 RSAPSSSigner newSHA512Signer(String privateKey)
privateKey
- The private key PEM expected to be in PKCS#1 or PKCS#8 format.public static RSAPSSSigner 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 RSA signature Algorithm.public static RSAPSSSigner 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 RSA signature Algorithm.public Algorithm getAlgorithm()
Signer
getAlgorithm
in interface Signer
public String getKid()
Signer
Copyright © 2021. All rights reserved.