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
public abstract class AbstractJoseAlgorithm extends AbstractAlgorithm implements JoseAlgorithm
Abstract implementation of anJoseAlgorithm.- Author:
- Martin Lindström (martin@idsec.se), Stefan Santesson (stefan@idsec.se)
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected 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
Constructors Modifier Constructor Description protectedAbstractJoseAlgorithm(String uri)Protected constructor used by builders.AbstractJoseAlgorithm(String uri, int order, String jcaName, com.nimbusds.jose.Algorithm joseAlgorithm)Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object obj)com.nimbusds.jose.AlgorithmgetJoseAlgorithm()Gets 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.StringtoString()-
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 Detail
-
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 AbstractJoseAlgorithm(String uri)
Protected constructor used by builders.- Parameters:
uri- the algorithm URI
-
-
Method Detail
-
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
public boolean equals(Object obj)
- Overrides:
equalsin classAbstractAlgorithm
-
toString
public String toString()
- Overrides:
toStringin classAbstractAlgorithm
-
-