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 HMACSigner |
newSHA256Signer(byte[] secret)
Build a new HMAC signer using a SHA-256 hash.
|
static HMACSigner |
newSHA256Signer(byte[] secret,
String kid)
Build a new HMAC signer using a SHA-256 hash.
|
static HMACSigner |
newSHA256Signer(byte[] secret,
String kid,
CryptoProvider cryptoProvider)
Build a new HMAC signer using a SHA-256 hash.
|
static HMACSigner |
newSHA256Signer(String secret)
Build a new HMAC signer using a SHA-256 hash.
|
static HMACSigner |
newSHA256Signer(String secret,
CryptoProvider cryptoProvider)
Build a new HMAC signer using a SHA-256 hash.
|
static HMACSigner |
newSHA256Signer(String secret,
String kid)
Build a new HMAC signer using a SHA-256 hash.
|
static HMACSigner |
newSHA256Signer(String secret,
String kid,
CryptoProvider cryptoProvider)
Build a new HMAC signer using a SHA-256 hash.
|
static HMACSigner |
newSHA384Signer(byte[] secret)
Build a new HMAC signer using a SHA-384 hash.
|
static HMACSigner |
newSHA384Signer(byte[] secret,
String kid)
Build a new HMAC signer using a SHA-384 hash.
|
static HMACSigner |
newSHA384Signer(byte[] secret,
String kid,
CryptoProvider cryptoProvider)
Build a new HMAC signer using a SHA-384 hash.
|
static HMACSigner |
newSHA384Signer(String secret)
Build a new HMAC signer using a SHA-384 hash.
|
static HMACSigner |
newSHA384Signer(String secret,
CryptoProvider cryptoProvider)
Build a new HMAC signer using a SHA-384 hash.
|
static HMACSigner |
newSHA384Signer(String secret,
String kid)
Build a new HMAC signer using a SHA-384 hash.
|
static HMACSigner |
newSHA384Signer(String secret,
String kid,
CryptoProvider cryptoProvider)
Build a new HMAC signer using a SHA-384 hash.
|
static HMACSigner |
newSHA512Signer(byte[] secret)
Build a new HMAC signer using a SHA-512 hash.
|
static HMACSigner |
newSHA512Signer(byte[] secret,
String kid)
Build a new HMAC signer using a SHA-512 hash.
|
static HMACSigner |
newSHA512Signer(byte[] secret,
String kid,
CryptoProvider cryptoProvider)
Build a new HMAC signer using a SHA-512 hash.
|
static HMACSigner |
newSHA512Signer(String secret)
Build a new HMAC signer using a SHA-512 hash.
|
static HMACSigner |
newSHA512Signer(String secret,
CryptoProvider cryptoProvider)
Build a new HMAC signer using a SHA-512 hash.
|
static HMACSigner |
newSHA512Signer(String secret,
String kid)
Build a new HMAC signer using a SHA-512 hash.
|
static HMACSigner |
newSHA512Signer(String secret,
String kid,
CryptoProvider cryptoProvider)
Build a new HMAC signer using a SHA-512 hash.
|
byte[] |
sign(String message)
Sign the provided message and return the signature.
|
public static HMACSigner newSHA256Signer(byte[] secret)
secret
- The secret used to generate the HMAC hash.public static HMACSigner newSHA256Signer(String secret)
secret
- The secret used to generate the HMAC hash.public static HMACSigner newSHA256Signer(byte[] secret, String kid)
secret
- The secret used to generate the HMAC hash.kid
- The key identifier. This will be used by the JWTEncoder to write the 'kid' header.public static HMACSigner newSHA256Signer(String secret, String kid)
secret
- The secret used to generate the HMAC hash.kid
- The key identifier. This will be used by the JWTEncoder to write the 'kid' header.public static HMACSigner newSHA256Signer(String secret, CryptoProvider cryptoProvider)
secret
- The secret used to generate the HMAC hash.cryptoProvider
- The crypto provider used to get the MAC digest algorithm.public static HMACSigner newSHA256Signer(byte[] secret, String kid, CryptoProvider cryptoProvider)
secret
- The secret used to generate the HMAC hash.kid
- The key identifier. This will be used by the JWTEncoder to write the 'kid' header.cryptoProvider
- The crypto provider used to get the MAC digest algorithm.public static HMACSigner newSHA256Signer(String secret, String kid, CryptoProvider cryptoProvider)
secret
- The secret used to generate the HMAC hash.kid
- The key identifier. This will be used by the JWTEncoder to write the 'kid' header.cryptoProvider
- The crypto provider used to get the MAC digest algorithm.public static HMACSigner newSHA384Signer(byte[] secret)
secret
- The secret used to generate the HMAC hash.public static HMACSigner newSHA384Signer(String secret)
secret
- The secret used to generate the HMAC hash.public static HMACSigner newSHA384Signer(byte[] secret, String kid)
secret
- The secret used to generate the HMAC hash.kid
- The key identifier. This will be used by the JWTEncoder to write the 'kid' header.public static HMACSigner newSHA384Signer(String secret, String kid)
secret
- The secret used to generate the HMAC hash.kid
- The key identifier. This will be used by the JWTEncoder to write the 'kid' header.public static HMACSigner newSHA384Signer(String secret, CryptoProvider cryptoProvider)
secret
- The secret used to generate the HMAC hash.cryptoProvider
- The crypto provider used to get the MAC digest algorithm.public static HMACSigner newSHA384Signer(byte[] secret, String kid, CryptoProvider cryptoProvider)
secret
- The secret used to generate the HMAC hash.kid
- The key identifier. This will be used by the JWTEncoder to write the 'kid' header.cryptoProvider
- The crypto provider used to get the MAC digest algorithm.public static HMACSigner newSHA384Signer(String secret, String kid, CryptoProvider cryptoProvider)
secret
- The secret used to generate the HMAC hash.kid
- The key identifier. This will be used by the JWTEncoder to write the 'kid' header.cryptoProvider
- The crypto provider used to get the MAC digest algorithm.public static HMACSigner newSHA512Signer(byte[] secret)
secret
- The secret used to generate the HMAC hash.public static HMACSigner newSHA512Signer(String secret)
secret
- The secret used to generate the HMAC hash.public static HMACSigner newSHA512Signer(byte[] secret, String kid)
secret
- The secret used to generate the HMAC hash.kid
- The key identifier. This will be used by the JWTEncoder to write the 'kid' header.public static HMACSigner newSHA512Signer(String secret, String kid)
secret
- The secret used to generate the HMAC hash.kid
- The key identifier. This will be used by the JWTEncoder to write the 'kid' header.public static HMACSigner newSHA512Signer(String secret, CryptoProvider cryptoProvider)
secret
- The secret used to generate the HMAC hash.cryptoProvider
- The crypto provider used to get the MAC digest algorithm.public static HMACSigner newSHA512Signer(byte[] secret, String kid, CryptoProvider cryptoProvider)
secret
- The secret used to generate the HMAC hash.kid
- The key identifier. This will be used by the JWTEncoder to write the 'kid' header.cryptoProvider
- The crypto provider used to get the MAC digest algorithm.public static HMACSigner newSHA512Signer(String secret, String kid, CryptoProvider cryptoProvider)
secret
- The secret used to generate the HMAC hash.kid
- The key identifier. This will be used by the JWTEncoder to write the 'kid' header.cryptoProvider
- The crypto provider used to get the MAC digest algorithm.public Algorithm getAlgorithm()
Signer
getAlgorithm
in interface Signer
public String getKid()
Signer
Copyright © 2022. All rights reserved.