Class AbstractJoseAlgorithm
java.lang.Object
se.swedenconnect.security.algorithms.impl.AbstractAlgorithm
se.swedenconnect.security.algorithms.impl.AbstractJoseAlgorithm
- All Implemented Interfaces:
Algorithm
,JoseAlgorithm
- Direct Known Subclasses:
AbstractKeyBasedAlgorithm
,MacAlgorithmImpl
Abstract implementation of an
JoseAlgorithm
.- Author:
- Martin Lindström (martin@idsec.se), Stefan Santesson (stefan@idsec.se)
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected static class
AbstractJoseAlgorithm.AbstractJoseAlgorithmBuilder<T extends AbstractJoseAlgorithm,
B extends AbstractJoseAlgorithm.AbstractJoseAlgorithmBuilder<T, ? extends AlgorithmBuilder<T>>> Abstract builder forJoseAlgorithm
objects.Nested classes/interfaces inherited from class se.swedenconnect.security.algorithms.impl.AbstractAlgorithm
AbstractAlgorithm.AbstractAlgorithmBuilder<T extends AbstractAlgorithm,
B extends AlgorithmBuilder<T>> -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
Protected constructor used by builders.AbstractJoseAlgorithm
(String uri, int order, String jcaName, com.nimbusds.jose.Algorithm joseAlgorithm) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionboolean
com.nimbusds.jose.Algorithm
Gets the JOSE (Javascript Object Signing and Encryption) algorithm representation.int
hashCode()
protected void
setJoseAlgorithm
(com.nimbusds.jose.Algorithm joseAlgorithm) Sets the JOSE algorithm representation for the algorithm.toString()
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, getType, getUri, isBlacklisted
-
Constructor Details
-
AbstractJoseAlgorithm
public AbstractJoseAlgorithm(String uri, int order, String jcaName, com.nimbusds.jose.Algorithm joseAlgorithm) Constructor.- Parameters:
uri
- the algorithm URIorder
- the ordering for the algorithmjcaName
- the JCA namejoseAlgorithm
- the JOSE algorithm (may be null)
-
AbstractJoseAlgorithm
Protected constructor used by builders.- Parameters:
uri
- the algorithm URI
-
-
Method Details
-
getJoseAlgorithm
public com.nimbusds.jose.Algorithm getJoseAlgorithm()Gets the JOSE (Javascript Object Signing and Encryption) algorithm representation.- Specified by:
getJoseAlgorithm
in interfaceJoseAlgorithm
- Returns:
- the JOSE algorithm, or null if no JOSE representation for the algorithm exists
-
setJoseAlgorithm
protected void setJoseAlgorithm(com.nimbusds.jose.Algorithm joseAlgorithm) Sets the JOSE algorithm representation for the algorithm.- Parameters:
joseAlgorithm
- the JOSE algorithm
-
hashCode
public int hashCode()- Overrides:
hashCode
in classAbstractAlgorithm
-
equals
- Overrides:
equals
in classAbstractAlgorithm
-
toString
- Overrides:
toString
in classAbstractAlgorithm
-