public class HmacUsingShaAlgorithm extends AlgorithmInfo implements JsonWebSignatureAlgorithm
| Modifier and Type | Class and Description |
|---|---|
static class |
HmacUsingShaAlgorithm.HmacSha256 |
static class |
HmacUsingShaAlgorithm.HmacSha384 |
static class |
HmacUsingShaAlgorithm.HmacSha512 |
log| Constructor and Description |
|---|
HmacUsingShaAlgorithm(String id,
String javaAlgo,
int minimumKeyLength) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
isAvailable() |
CryptoPrimitive |
prepareForSign(Key key,
ProviderContext providerContext) |
byte[] |
sign(CryptoPrimitive cryptoPrimitive,
byte[] securedInputBytes) |
void |
validateSigningKey(Key key) |
void |
validateVerificationKey(Key key) |
boolean |
verifySignature(byte[] signatureBytes,
Key key,
byte[] securedInputBytes,
ProviderContext providerContext) |
getAlgorithmIdentifier, getJavaAlgorithm, getKeyPersuasion, getKeyType, setAlgorithmIdentifier, setJavaAlgorithm, setKeyPersuasion, setKeyType, toStringclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetAlgorithmIdentifier, getJavaAlgorithm, getKeyPersuasion, getKeyTypepublic boolean verifySignature(byte[] signatureBytes,
Key key,
byte[] securedInputBytes,
ProviderContext providerContext)
throws JoseException
verifySignature in interface JsonWebSignatureAlgorithmJoseExceptionpublic CryptoPrimitive prepareForSign(Key key, ProviderContext providerContext) throws JoseException
prepareForSign in interface JsonWebSignatureAlgorithmJoseExceptionpublic byte[] sign(CryptoPrimitive cryptoPrimitive, byte[] securedInputBytes) throws JoseException
sign in interface JsonWebSignatureAlgorithmJoseExceptionpublic void validateSigningKey(Key key) throws InvalidKeyException
validateSigningKey in interface JsonWebSignatureAlgorithmInvalidKeyExceptionpublic void validateVerificationKey(Key key) throws InvalidKeyException
validateVerificationKey in interface JsonWebSignatureAlgorithmInvalidKeyExceptionpublic boolean isAvailable()
isAvailable in interface AlgorithmCopyright © 2021. All rights reserved.