Package org.jose4j.jws
Class HmacUsingShaAlgorithm
java.lang.Object
org.jose4j.jwa.AlgorithmInfo
org.jose4j.jws.HmacUsingShaAlgorithm
- All Implemented Interfaces:
Algorithm,JsonWebSignatureAlgorithm
- Direct Known Subclasses:
HmacUsingShaAlgorithm.HmacSha256,HmacUsingShaAlgorithm.HmacSha384,HmacUsingShaAlgorithm.HmacSha512
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classstatic classstatic class -
Field Summary
Fields inherited from class org.jose4j.jwa.AlgorithmInfo
log -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanprepareForSign(Key key, ProviderContext providerContext) byte[]sign(CryptoPrimitive cryptoPrimitive, byte[] securedInputBytes) voidvalidateSigningKey(Key key) voidbooleanverifySignature(byte[] signatureBytes, Key key, byte[] securedInputBytes, ProviderContext providerContext) Methods inherited from class org.jose4j.jwa.AlgorithmInfo
getAlgorithmIdentifier, getJavaAlgorithm, getKeyPersuasion, getKeyType, setAlgorithmIdentifier, setJavaAlgorithm, setKeyPersuasion, setKeyType, toStringMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.jose4j.jwa.Algorithm
getAlgorithmIdentifier, getJavaAlgorithm, getKeyPersuasion, getKeyType
-
Constructor Details
-
HmacUsingShaAlgorithm
-
-
Method Details
-
verifySignature
public boolean verifySignature(byte[] signatureBytes, Key key, byte[] securedInputBytes, ProviderContext providerContext) throws JoseException - Specified by:
verifySignaturein interfaceJsonWebSignatureAlgorithm- Throws:
JoseException
-
prepareForSign
public CryptoPrimitive prepareForSign(Key key, ProviderContext providerContext) throws JoseException - Specified by:
prepareForSignin interfaceJsonWebSignatureAlgorithm- Throws:
JoseException
-
sign
- Specified by:
signin interfaceJsonWebSignatureAlgorithm- Throws:
JoseException
-
validateSigningKey
- Specified by:
validateSigningKeyin interfaceJsonWebSignatureAlgorithm- Throws:
InvalidKeyException
-
validateVerificationKey
- Specified by:
validateVerificationKeyin interfaceJsonWebSignatureAlgorithm- Throws:
InvalidKeyException
-
isAvailable
public boolean isAvailable()- Specified by:
isAvailablein interfaceAlgorithm
-