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() |
byte[] |
sign(Key key,
byte[] securedInputBytes) |
void |
validateSigningKey(Key key) |
void |
validateVerificationKey(Key key) |
boolean |
verifySignature(byte[] signatureBytes,
Key key,
byte[] securedInputBytes) |
getAlgorithmIdentifier, getJavaAlgorithm, getKeyPersuasion, getKeyType, setAlgorithmIdentifier, setJavaAlgorithm, setKeyPersuasion, setKeyType
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getAlgorithmIdentifier, getJavaAlgorithm, getKeyPersuasion, getKeyType
public boolean verifySignature(byte[] signatureBytes, Key key, byte[] securedInputBytes) throws InvalidKeyException
verifySignature
in interface JsonWebSignatureAlgorithm
InvalidKeyException
public byte[] sign(Key key, byte[] securedInputBytes) throws InvalidKeyException
sign
in interface JsonWebSignatureAlgorithm
InvalidKeyException
public void validateSigningKey(Key key) throws InvalidKeyException
validateSigningKey
in interface JsonWebSignatureAlgorithm
InvalidKeyException
public void validateVerificationKey(Key key) throws InvalidKeyException
validateVerificationKey
in interface JsonWebSignatureAlgorithm
InvalidKeyException
public boolean isAvailable()
isAvailable
in interface Algorithm
Copyright © 2015. All rights reserved.