Class MacAlgorithmImpl
java.lang.Object
se.swedenconnect.security.algorithms.impl.AbstractAlgorithm
se.swedenconnect.security.algorithms.impl.AbstractJoseAlgorithm
se.swedenconnect.security.algorithms.impl.MacAlgorithmImpl
- All Implemented Interfaces:
Algorithm
,JoseAlgorithm
,MacAlgorithm
Implementation class for
MacAlgorithm
.- Author:
- Martin Lindström (martin@idsec.se), Stefan Santesson (stefan@idsec.se)
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class se.swedenconnect.security.algorithms.impl.AbstractJoseAlgorithm
AbstractJoseAlgorithm.AbstractJoseAlgorithmBuilder<T extends AbstractJoseAlgorithm,
B extends AbstractJoseAlgorithm.AbstractJoseAlgorithmBuilder<T, ? extends AlgorithmBuilder<T>>> Nested classes/interfaces inherited from class se.swedenconnect.security.algorithms.impl.AbstractAlgorithm
AbstractAlgorithm.AbstractAlgorithmBuilder<T extends AbstractAlgorithm,
B extends AlgorithmBuilder<T>> -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
MacAlgorithmImpl
(String uri) Protected constructor used by builder.MacAlgorithmImpl
(String uri, int order, String jcaName, com.nimbusds.jose.JWSAlgorithm joseAlgorithm, MessageDigestAlgorithm messageDigestAlgorithm) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionCreates a builder.boolean
Gets the message digest algorithm that this MAC algorithm uses.int
hashCode()
protected void
setMessageDigestAlgorithm
(MessageDigestAlgorithm messageDigestAlgorithm) Sets the message digest algorithm.toString()
Methods inherited from class se.swedenconnect.security.algorithms.impl.AbstractJoseAlgorithm
getJoseAlgorithm, setJoseAlgorithm
Methods inherited from class se.swedenconnect.security.algorithms.impl.AbstractAlgorithm
getJcaName, getOrder, getUri, isBlacklisted, setBlacklisted, setJcaName, setOrder
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface se.swedenconnect.security.algorithms.Algorithm
getJcaName, getOrder, getUri, isBlacklisted
Methods inherited from interface se.swedenconnect.security.algorithms.JoseAlgorithm
getJoseAlgorithm
Methods inherited from interface se.swedenconnect.security.algorithms.MacAlgorithm
getType
-
Constructor Details
-
MacAlgorithmImpl
public MacAlgorithmImpl(String uri, int order, String jcaName, com.nimbusds.jose.JWSAlgorithm joseAlgorithm, MessageDigestAlgorithm messageDigestAlgorithm) Constructor.- Parameters:
uri
- the algorithm URIorder
- the ordering for the algorithmjcaName
- the JCA namejoseAlgorithm
- the JOSE algorithm (may be null)messageDigestAlgorithm
- the message digest algorithm this signature algorithm uses
-
MacAlgorithmImpl
Protected constructor used by builder.- Parameters:
uri
- the algorithm URI
-
-
Method Details
-
builder
Creates a builder.- Parameters:
uri
- the algorithm URI- Returns:
- the builder
-
getMessageDigestAlgorithm
Gets the message digest algorithm that this MAC algorithm uses.- Specified by:
getMessageDigestAlgorithm
in interfaceMacAlgorithm
- Returns:
- the message digest algorithm
-
setMessageDigestAlgorithm
Sets the message digest algorithm.- Parameters:
messageDigestAlgorithm
- the digest algorithm
-
hashCode
public int hashCode()- Overrides:
hashCode
in classAbstractJoseAlgorithm
-
equals
- Overrides:
equals
in classAbstractJoseAlgorithm
-
toString
- Overrides:
toString
in classAbstractJoseAlgorithm
-