Class AbstractKeyBasedAlgorithm
java.lang.Object
se.swedenconnect.security.algorithms.impl.AbstractAlgorithm
se.swedenconnect.security.algorithms.impl.AbstractJoseAlgorithm
se.swedenconnect.security.algorithms.impl.AbstractKeyBasedAlgorithm
- All Implemented Interfaces:
Algorithm,JoseAlgorithm,KeyBasedAlgorithm
- Direct Known Subclasses:
AbstractEncryptionAlgorithm,KeyTransportAlgorithmImpl,SignatureAlgorithmImpl
public abstract class AbstractKeyBasedAlgorithm
extends AbstractJoseAlgorithm
implements KeyBasedAlgorithm
Abstract implementation of an
KeyBasedAlgorithm.- Author:
- Martin Lindström (martin@idsec.se), Stefan Santesson (stefan@idsec.se)
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected static classAbstractKeyBasedAlgorithm.AbstractKeyBasedAlgorithmBuilder<T extends AbstractKeyBasedAlgorithm,B extends AbstractKeyBasedAlgorithm.AbstractKeyBasedAlgorithmBuilder<T, ? extends AlgorithmBuilder<T>>> Abstract builder forKeyBasedAlgorithmobjects.Nested 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
ConstructorsModifierConstructorDescriptionprotectedProtected constructor used by builders.AbstractKeyBasedAlgorithm(String uri, int order, String keyType, String jcaName, com.nimbusds.jose.Algorithm joseAlgorithm) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionbooleanGets the "key type", e.g.inthashCode()protected voidsetKeyType(String keyType) Sets the "key type" for the algorithm.toString()Methods inherited from class se.swedenconnect.security.algorithms.impl.AbstractJoseAlgorithm
getJoseAlgorithm, setJoseAlgorithmMethods 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
-
AbstractKeyBasedAlgorithm
public AbstractKeyBasedAlgorithm(String uri, int order, String keyType, String jcaName, com.nimbusds.jose.Algorithm joseAlgorithm) Constructor.- Parameters:
uri- the algorithm URIorder- the ordering for the algorithmkeyType- the key typejcaName- the JCA namejoseAlgorithm- the JOSE algorithm (may be null)
-
AbstractKeyBasedAlgorithm
Protected constructor used by builders.- Parameters:
uri- the algorithm URI
-
-
Method Details
-
getKeyType
Gets the "key type", e.g. "RSA", "AES", for the algorithm.- Specified by:
getKeyTypein interfaceKeyBasedAlgorithm- Returns:
- the key type
-
setKeyType
Sets the "key type" for the algorithm.- Parameters:
keyType- the key type
-
hashCode
public int hashCode()- Overrides:
hashCodein classAbstractJoseAlgorithm
-
equals
- Overrides:
equalsin classAbstractJoseAlgorithm
-
toString
- Overrides:
toStringin classAbstractJoseAlgorithm
-