Class RSAPSSSignatureAlgorithmImpl
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
se.swedenconnect.security.algorithms.impl.RSAPSSSignatureAlgorithmImpl
- All Implemented Interfaces:
Algorithm
,AlgorithmIdentifierAware
,JoseAlgorithm
,KeyBasedAlgorithm
,RSAPSSSignatureAlgorithm
,SignatureAlgorithm
- Direct Known Subclasses:
NoParamsRSAPSSSignatureAlgorithm
public class RSAPSSSignatureAlgorithmImpl
extends SignatureAlgorithmImpl
implements RSAPSSSignatureAlgorithm
Implementation class for
RSAPSSSignatureAlgorithm
.- Author:
- Martin Lindström (martin@idsec.se), Stefan Santesson (stefan@idsec.se)
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class se.swedenconnect.security.algorithms.impl.SignatureAlgorithmImpl
SignatureAlgorithmImpl.AbstractSignatureAlgorithmBuilder<T extends SignatureAlgorithmImpl,
B extends SignatureAlgorithmImpl.AbstractSignatureAlgorithmBuilder<T, ? extends AlgorithmBuilder<T>>>, SignatureAlgorithmImpl.SignatureAlgorithmBuilder 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.RSAPSSSignatureAlgorithmImpl
(String uri, int order, String keyType, String jcaName, PSSParameterSpec parameterSpec, com.nimbusds.jose.JWSAlgorithm joseAlgorithm, MessageDigestAlgorithm messageDigestAlgorithm) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionboolean
getBuilder
(String uri) Creates a builder.Gets the MGF digest algorithm.Gets the MGF URI.Gets the parameter spec for the RSA-PSS algorithm.int
hashCode()
void
setMGFDigestAlgorithm
(MessageDigestAlgorithm mgfDigestAlgorithm) Assigns the MGF digest algorithm.void
Assigns the MGF URI.protected void
setParameterSpec
(PSSParameterSpec parameterSpec) Assigns the parameter spec.toString()
Methods inherited from class se.swedenconnect.security.algorithms.impl.SignatureAlgorithmImpl
builder, getAlgorithmIdentifier, getMessageDigestAlgorithm, setJcaName, setMessageDigestAlgorithm
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.AlgorithmIdentifierAware
getAlgorithmIdentifier
Methods inherited from interface se.swedenconnect.security.algorithms.JoseAlgorithm
getJoseAlgorithm
Methods inherited from interface se.swedenconnect.security.algorithms.RSAPSSSignatureAlgorithm
getKeyType
Methods inherited from interface se.swedenconnect.security.algorithms.SignatureAlgorithm
getMessageDigestAlgorithm, getType
-
Constructor Details
-
RSAPSSSignatureAlgorithmImpl
public RSAPSSSignatureAlgorithmImpl(String uri, int order, String keyType, String jcaName, PSSParameterSpec parameterSpec, com.nimbusds.jose.JWSAlgorithm joseAlgorithm, MessageDigestAlgorithm messageDigestAlgorithm) Constructor.- Parameters:
uri
- the algorithm URIorder
- the ordering for the algorithmkeyType
- the key typejcaName
- the JCA nameparameterSpec
- the parameter specjoseAlgorithm
- the JOSE algorithmmessageDigestAlgorithm
- the message digest algorithm this signature algorithm uses
-
RSAPSSSignatureAlgorithmImpl
Protected constructor used by builder.- Parameters:
uri
- the algorithm URI
-
-
Method Details
-
getBuilder
Creates a builder.- Parameters:
uri
- the algorithm URI- Returns:
- the builder
-
getParameterSpec
Gets the parameter spec for the RSA-PSS algorithm.- Specified by:
getParameterSpec
in interfaceRSAPSSSignatureAlgorithm
- Returns:
- the PSSParameterSpec
-
setParameterSpec
Assigns the parameter spec.- Parameters:
parameterSpec
- the parameter spec
-
getMGFUri
Gets the MGF URI.- Specified by:
getMGFUri
in interfaceRSAPSSSignatureAlgorithm
- Returns:
- the MGF URI
-
setMGFUri
Assigns the MGF URI. If not assigned, the default given byRSAPSSSignatureAlgorithm.getMGFUri()
is used.- Parameters:
mgfUri
- the MGF URI
-
getMGFDigestAlgorithm
Gets the MGF digest algorithm.- Specified by:
getMGFDigestAlgorithm
in interfaceRSAPSSSignatureAlgorithm
- Returns:
- the MGF digest algorithm
-
setMGFDigestAlgorithm
Assigns the MGF digest algorithm. If not assigned,SignatureAlgorithm.getMessageDigestAlgorithm()
will be used.- Parameters:
mgfDigestAlgorithm
- the MGF digest algorithm
-
hashCode
public int hashCode()- Overrides:
hashCode
in classSignatureAlgorithmImpl
-
equals
- Overrides:
equals
in classSignatureAlgorithmImpl
-
toString
- Overrides:
toString
in classSignatureAlgorithmImpl
-