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 class
SignatureAlgorithmImpl.AbstractSignatureAlgorithmBuilder<T extends SignatureAlgorithmImpl,
B extends SignatureAlgorithmImpl.AbstractSignatureAlgorithmBuilder<T, ? extends AlgorithmBuilder<T>>> Abstract builder forSignatureAlgorithm
.static class
Abstract 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
ConstructorsModifierConstructorDescriptionprotected
Protected 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.boolean
org.bouncycastle.asn1.x509.AlgorithmIdentifier
Gets the ASN.1AlgorithmIdentifier
for the algorithm.Gets the message digest algorithm that this signature algorithm uses.int
hashCode()
protected void
setJcaName
(String jcaName) Assigns the JCA name.protected void
setMessageDigestAlgorithm
(MessageDigestAlgorithm messageDigestAlgorithm) Sets the message digest algorithm.toString()
Methods inherited from class se.swedenconnect.security.algorithms.impl.AbstractKeyBasedAlgorithm
getKeyType, setKeyType
Methods inherited from class se.swedenconnect.security.algorithms.impl.AbstractJoseAlgorithm
getJoseAlgorithm, setJoseAlgorithm
Methods inherited from class se.swedenconnect.security.algorithms.impl.AbstractAlgorithm
getJcaName, getOrder, getUri, isBlacklisted, setBlacklisted, 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, getUri, isBlacklisted
Methods inherited from interface se.swedenconnect.security.algorithms.JoseAlgorithm
getJoseAlgorithm
Methods inherited from interface se.swedenconnect.security.algorithms.KeyBasedAlgorithm
getKeyType
Methods 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:
getMessageDigestAlgorithm
in 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.1AlgorithmIdentifier
for the algorithm.- Specified by:
getAlgorithmIdentifier
in interfaceAlgorithmIdentifierAware
- Returns:
- the AlgorithmIdentifier
-
setJcaName
Assigns the JCA name.- Overrides:
setJcaName
in classAbstractAlgorithm
- Parameters:
jcaName
- the JCA name
-
hashCode
public int hashCode()- Overrides:
hashCode
in classAbstractKeyBasedAlgorithm
-
equals
- Overrides:
equals
in classAbstractKeyBasedAlgorithm
-
toString
- Overrides:
toString
in classAbstractKeyBasedAlgorithm
-