Class SignatureAlgorithmImpl
java.lang.Object
se.swedenconnect.security.algorithms.impl.AbstractAlgorithm
se.swedenconnect.security.algorithms.impl.AbstractJoseAlgorithm
se.swedenconnect.security.algorithms.impl.AbstractKeyBasedAlgorithm
se.swedenconnect.security.algorithms.impl.SignatureAlgorithmImpl
- All Implemented Interfaces:
Algorithm,AlgorithmIdentifierAware,JoseAlgorithm,KeyBasedAlgorithm,SignatureAlgorithm
- Direct Known Subclasses:
RSAPSSSignatureAlgorithmImpl
Implementation class for
SignatureAlgorithm.- Author:
- Martin Lindström (martin@idsec.se), Stefan Santesson (stefan@idsec.se)
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected static classSignatureAlgorithmImpl.AbstractSignatureAlgorithmBuilder<T extends SignatureAlgorithmImpl,B extends SignatureAlgorithmImpl.AbstractSignatureAlgorithmBuilder<T, ? extends AlgorithmBuilder<T>>> Abstract builder forSignatureAlgorithm.static classAbstract builder forSignatureAlgorithm.Nested classes/interfaces inherited from class se.swedenconnect.security.algorithms.impl.AbstractKeyBasedAlgorithm
AbstractKeyBasedAlgorithm.AbstractKeyBasedAlgorithmBuilder<T extends AbstractKeyBasedAlgorithm,B extends AbstractKeyBasedAlgorithm.AbstractKeyBasedAlgorithmBuilder<T, ? extends AlgorithmBuilder<T>>> 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 builder.SignatureAlgorithmImpl(String uri, int order, String keyType, String jcaName, com.nimbusds.jose.JWSAlgorithm joseAlgorithm, MessageDigestAlgorithm messageDigestAlgorithm) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionCreates a builder.booleanorg.bouncycastle.asn1.x509.AlgorithmIdentifierGets the ASN.1AlgorithmIdentifierfor the algorithm.Gets the message digest algorithm that this signature algorithm uses.inthashCode()protected voidsetJcaName(String jcaName) Assigns the JCA name.protected voidsetMessageDigestAlgorithm(MessageDigestAlgorithm messageDigestAlgorithm) Sets the message digest algorithm.toString()Methods inherited from class se.swedenconnect.security.algorithms.impl.AbstractKeyBasedAlgorithm
getKeyType, setKeyTypeMethods 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, 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, getUri, isBlacklistedMethods inherited from interface se.swedenconnect.security.algorithms.JoseAlgorithm
getJoseAlgorithmMethods inherited from interface se.swedenconnect.security.algorithms.KeyBasedAlgorithm
getKeyTypeMethods inherited from interface se.swedenconnect.security.algorithms.SignatureAlgorithm
getType
-
Constructor Details
-
SignatureAlgorithmImpl
public SignatureAlgorithmImpl(String uri, int order, String keyType, String jcaName, com.nimbusds.jose.JWSAlgorithm joseAlgorithm, MessageDigestAlgorithm messageDigestAlgorithm) Constructor.- Parameters:
uri- the algorithm URIorder- the ordering for the algorithmkeyType- the key typejcaName- the JCA namejoseAlgorithm- the JOSE algorithmmessageDigestAlgorithm- the message digest algorithm this signature algorithm uses
-
SignatureAlgorithmImpl
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 signature algorithm uses.- Specified by:
getMessageDigestAlgorithmin interfaceSignatureAlgorithm- Returns:
- the message digest algorithm
-
setMessageDigestAlgorithm
Sets the message digest algorithm.- Parameters:
messageDigestAlgorithm- the digest algorithm
-
getAlgorithmIdentifier
public org.bouncycastle.asn1.x509.AlgorithmIdentifier getAlgorithmIdentifier()Gets the ASN.1AlgorithmIdentifierfor the algorithm.- Specified by:
getAlgorithmIdentifierin interfaceAlgorithmIdentifierAware- Returns:
- the AlgorithmIdentifier
-
setJcaName
Assigns the JCA name.- Overrides:
setJcaNamein classAbstractAlgorithm- Parameters:
jcaName- the JCA name
-
hashCode
public int hashCode()- Overrides:
hashCodein classAbstractKeyBasedAlgorithm
-
equals
- Overrides:
equalsin classAbstractKeyBasedAlgorithm
-
toString
- Overrides:
toStringin classAbstractKeyBasedAlgorithm
-