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 classAbstractJoseAlgorithm.AbstractJoseAlgorithmBuilder<T extends AbstractJoseAlgorithm,B extends AbstractJoseAlgorithm.AbstractJoseAlgorithmBuilder<T, ? extends AlgorithmBuilder<T>>> Abstract builder forJoseAlgorithmobjects.Nested classes/interfaces inherited from class se.swedenconnect.security.algorithms.impl.AbstractAlgorithm
AbstractAlgorithm.AbstractAlgorithmBuilder<T extends AbstractAlgorithm,B extends AlgorithmBuilder<T>> -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedProtected constructor used by builders.AbstractJoseAlgorithm(String uri, int order, String jcaName, com.nimbusds.jose.Algorithm joseAlgorithm) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionbooleancom.nimbusds.jose.AlgorithmGets the JOSE (Javascript Object Signing and Encryption) algorithm representation.inthashCode()protected voidsetJoseAlgorithm(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, setOrderMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods 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:
getJoseAlgorithmin 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:
hashCodein classAbstractAlgorithm
-
equals
- Overrides:
equalsin classAbstractAlgorithm
-
toString
- Overrides:
toStringin classAbstractAlgorithm
-