APIdia Launch Partner
Top Description Inners Fields Constructors Methods
org.jcp.xml.dsig.internal.dom

public abstract Class DOMRSAPSSSignatureMethod

extends AbstractDOMSignatureMethod
Class Inheritance
Known Direct Subclasses
org.jcp.xml.dsig.internal.dom.DOMRSAPSSSignatureMethod.RSAPSS
Imports
java.io.IOException, java.security.InvalidAlgorithmParameterException, .InvalidKeyException, .Key, .NoSuchAlgorithmException, .PrivateKey, .Provider, .PublicKey, .SecureRandom, .Signature, .SignatureException, java.security.spec.AlgorithmParameterSpec, .MGF1ParameterSpec, .PSSParameterSpec, javax.xml.crypto.MarshalException, javax.xml.crypto.dsig.*, javax.xml.crypto.dsig.spec.RSAPSSParameterSpec, .SignatureMethodParameterSpec, org.jcp.xml.dsig.internal.SignerOutputStream, com.sun.org.apache.xml.internal.security.algorithms.implementations.SignatureBaseRSA.SignatureRSASSAPSS.DigestAlgorithm, com.sun.org.apache.xml.internal.security.utils.Constants, .XMLUtils, org.w3c.dom.DOMException, .Document, .Element, .Text

DOM-based abstract implementation of SignatureMethod for RSA-PSS.

Nested and Inner Type Summary

Modifier and TypeClass and Description
pack-priv static class

Field Summary

Modifier and TypeField and Description
private static final RSAPSSParameterSpec
private static final String
private static final String
private static final Logger
private final SignatureMethodParameterSpec
pack-priv static final String
private Signature
private PSSParameterSpec

Constructor Summary

AccessConstructor and Description
pack-priv
DOMRSAPSSSignatureMethod(AlgorithmParameterSpec
the algorithm-specific params (may be null)
params
)

Creates a DOMSignatureMethod.

pack-priv
DOMRSAPSSSignatureMethod(Element
a SignatureMethod element
smElem
)

Creates a DOMSignatureMethod from an element.

Method Summary

Modifier and TypeMethod and Description
pack-priv void
checkParams(SignatureMethodParameterSpec params)

Overrides org.jcp.xml.dsig.internal.dom.AbstractDOMSignatureMethod.checkParams.

Checks if the specified parameters are valid for this algorithm.

public final AlgorithmParameterSpec
getParameterSpec()

Implements javax.xml.crypto.dsig.SignatureMethod.getParameterSpec.

Returns the algorithm-specific input parameters of this SignatureMethod.

pack-priv void
marshalParams(Element parent, String prefix)

Overrides org.jcp.xml.dsig.internal.dom.AbstractDOMSignatureMethod.marshalParams.

Marshals the algorithm-specific parameters to an Element and appends it to the specified parent element.

pack-priv boolean
paramsEqual(AlgorithmParameterSpec spec)

Overrides org.jcp.xml.dsig.internal.dom.AbstractDOMSignatureMethod.paramsEqual.

Returns true if parameters are equal; false otherwise.

pack-priv byte[]
sign(Key key, SignedInfo si, XMLSignContext context)

Implements abstract org.jcp.xml.dsig.internal.dom.AbstractDOMSignatureMethod.sign.

Signs the bytes with the specified key, using the underlying Signature or Mac algorithm.

pack-priv SignatureMethodParameterSpec
unmarshalParams(Element paramsElem)

Overrides org.jcp.xml.dsig.internal.dom.AbstractDOMSignatureMethod.unmarshalParams.

Unmarshals SignatureMethodParameterSpec from the specified Element.

private static SignatureBaseRSA.SignatureRSASSAPSS.DigestAlgorithm
pack-priv boolean
verify(Key key, SignedInfo si, byte[] sig, XMLValidateContext context)

Implements abstract org.jcp.xml.dsig.internal.dom.AbstractDOMSignatureMethod.verify.

Verifies the passed-in signature with the specified key, using the underlying Signature or Mac algorithm.

Inherited from org.jcp.xml.dsig.internal.dom.AbstractDOMSignatureMethod:
equalsgetAlgorithmTypegetJCAAlgorithmhashCodemarshal

Field Detail

DEFAULT_PSS_SPECback to summary
private static final RSAPSSParameterSpec DEFAULT_PSS_SPEC
DOM_SIGNATURE_PROVIDERback to summary
private static final String DOM_SIGNATURE_PROVIDER
DOM_SIGNATURE_RANDOMback to summary
private static final String DOM_SIGNATURE_RANDOM
LOGback to summary
private static final Logger LOG
paramsback to summary
private final SignatureMethodParameterSpec params
RSA_PSSback to summary
pack-priv static final String RSA_PSS

Hides javax.xml.crypto.dsig.SignatureMethod.RSA_PSS.

signatureback to summary
private Signature signature
specback to summary
private PSSParameterSpec spec

Constructor Detail

DOMRSAPSSSignatureMethodback to summary
pack-priv DOMRSAPSSSignatureMethod(AlgorithmParameterSpec params) throws InvalidAlgorithmParameterException

Creates a DOMSignatureMethod.

Parameters
params:AlgorithmParameterSpec

the algorithm-specific params (may be null)

Exceptions
InvalidAlgorithmParameterException:
if the parameters are not appropriate for this signature method
DOMRSAPSSSignatureMethodback to summary
pack-priv DOMRSAPSSSignatureMethod(Element smElem) throws MarshalException

Creates a DOMSignatureMethod from an element. This ctor invokes the unmarshalParams method to unmarshal any algorithm-specific input parameters.

Parameters
smElem:Element

a SignatureMethod element

Method Detail

checkParamsback to summary
pack-priv void checkParams(SignatureMethodParameterSpec params) throws InvalidAlgorithmParameterException

Overrides org.jcp.xml.dsig.internal.dom.AbstractDOMSignatureMethod.checkParams.

Doc from org.jcp.xml.dsig.internal.dom.AbstractDOMSignatureMethod.checkParams.

Checks if the specified parameters are valid for this algorithm. By default, this method throws an exception if parameters are specified since most SignatureMethod algorithms do not have parameters. Subclasses should override it if they have parameters.

Annotations
@Override
Exceptions
InvalidAlgorithmParameterException:
if the parameters are not appropriate for this signature method
getParameterSpecback to summary
public final AlgorithmParameterSpec getParameterSpec()

Implements javax.xml.crypto.dsig.SignatureMethod.getParameterSpec.

Doc from javax.xml.crypto.dsig.SignatureMethod.getParameterSpec.

Returns the algorithm-specific input parameters of this SignatureMethod.

The returned parameters can be typecast to a SignatureMethodParameterSpec object.

Annotations
@Override
marshalParamsback to summary
pack-priv void marshalParams(Element parent, String prefix) throws MarshalException

Overrides org.jcp.xml.dsig.internal.dom.AbstractDOMSignatureMethod.marshalParams.

Doc from org.jcp.xml.dsig.internal.dom.AbstractDOMSignatureMethod.marshalParams.

Marshals the algorithm-specific parameters to an Element and appends it to the specified parent element. By default, this method throws an exception since most SignatureMethod algorithms do not have parameters. Subclasses should override it if they have parameters.

Annotations
@Override
Exceptions
MarshalException:
if the parameters cannot be marshalled
paramsEqualback to summary
pack-priv boolean paramsEqual(AlgorithmParameterSpec spec)

Overrides org.jcp.xml.dsig.internal.dom.AbstractDOMSignatureMethod.paramsEqual.

Doc from org.jcp.xml.dsig.internal.dom.AbstractDOMSignatureMethod.paramsEqual.

Returns true if parameters are equal; false otherwise. Subclasses should override this method to compare algorithm-specific parameters.

Annotations
@Override
signback to summary
pack-priv byte[] sign(Key key, SignedInfo si, XMLSignContext context) throws InvalidKeyException, XMLSignatureException

Implements abstract org.jcp.xml.dsig.internal.dom.AbstractDOMSignatureMethod.sign.

Doc from org.jcp.xml.dsig.internal.dom.AbstractDOMSignatureMethod.sign.

Signs the bytes with the specified key, using the underlying Signature or Mac algorithm.

Annotations
@Override
Exceptions
InvalidKeyException:
if the key is improperly encoded, of the wrong type, or parameters are missing, etc
XMLSignatureException:
if an unexpected error occurs
unmarshalParamsback to summary
pack-priv SignatureMethodParameterSpec unmarshalParams(Element paramsElem) throws MarshalException

Overrides org.jcp.xml.dsig.internal.dom.AbstractDOMSignatureMethod.unmarshalParams.

Doc from org.jcp.xml.dsig.internal.dom.AbstractDOMSignatureMethod.unmarshalParams.

Unmarshals SignatureMethodParameterSpec from the specified Element. By default, this method throws an exception since most SignatureMethod algorithms do not have parameters. Subclasses should override it if they have parameters.

Annotations
@Override
Exceptions
MarshalException:
if the parameters cannot be unmarshalled
validateDigestAlgorithmback to summary
private static SignatureBaseRSA.SignatureRSASSAPSS.DigestAlgorithm validateDigestAlgorithm(String input) throws MarshalException
verifyback to summary
pack-priv boolean verify(Key key, SignedInfo si, byte[] sig, XMLValidateContext context) throws InvalidKeyException, SignatureException, XMLSignatureException

Implements abstract org.jcp.xml.dsig.internal.dom.AbstractDOMSignatureMethod.verify.

Doc from org.jcp.xml.dsig.internal.dom.AbstractDOMSignatureMethod.verify.

Verifies the passed-in signature with the specified key, using the underlying Signature or Mac algorithm.

Annotations
@Override
Exceptions
InvalidKeyException:
if the key is improperly encoded, of the wrong type, or parameters are missing, etc
SignatureException:
if an unexpected error occurs, such as the passed in signature is improperly encoded
XMLSignatureException:
if an unexpected error occurs
org.jcp.xml.dsig.internal.dom back to summary

pack-priv final Class DOMRSAPSSSignatureMethod.RSAPSS

extends DOMRSAPSSSignatureMethod
Class Inheritance

Field Summary

Inherited from org.jcp.xml.dsig.internal.dom.DOMRSAPSSSignatureMethod:
RSA_PSS

Constructor Summary

AccessConstructor and Description
pack-priv
pack-priv
RSAPSS(Element dmElem)

Method Summary

Modifier and TypeMethod and Description
public String
getAlgorithm()

Implements javax.xml.crypto.AlgorithmMethod.getAlgorithm.

Returns the algorithm URI of this AlgorithmMethod.

pack-priv AbstractDOMSignatureMethod.Type
getAlgorithmType()

Implements abstract org.jcp.xml.dsig.internal.dom.AbstractDOMSignatureMethod.getAlgorithmType.

Returns the type of signature algorithm.

pack-priv String
getJCAAlgorithm()

Implements abstract org.jcp.xml.dsig.internal.dom.AbstractDOMSignatureMethod.getJCAAlgorithm.

Returns the java.security.Signature or javax.crypto.Mac standard algorithm name.

Inherited from org.jcp.xml.dsig.internal.dom.DOMRSAPSSSignatureMethod:
checkParamsgetParameterSpecmarshalParamsparamsEqualsignunmarshalParamsverify

Constructor Detail

RSAPSSback to summary
pack-priv RSAPSS(AlgorithmParameterSpec params) throws InvalidAlgorithmParameterException
RSAPSSback to summary
pack-priv RSAPSS(Element dmElem) throws MarshalException

Method Detail

getAlgorithmback to summary
public String getAlgorithm()

Implements javax.xml.crypto.AlgorithmMethod.getAlgorithm.

Doc from javax.xml.crypto.AlgorithmMethod.getAlgorithm.

Returns the algorithm URI of this AlgorithmMethod.

Annotations
@Override
getAlgorithmTypeback to summary
pack-priv AbstractDOMSignatureMethod.Type getAlgorithmType()

Implements abstract org.jcp.xml.dsig.internal.dom.AbstractDOMSignatureMethod.getAlgorithmType.

Doc from org.jcp.xml.dsig.internal.dom.AbstractDOMSignatureMethod.getAlgorithmType.

Returns the type of signature algorithm.

Annotations
@Override
getJCAAlgorithmback to summary
pack-priv String getJCAAlgorithm()

Implements abstract org.jcp.xml.dsig.internal.dom.AbstractDOMSignatureMethod.getJCAAlgorithm.

Doc from org.jcp.xml.dsig.internal.dom.AbstractDOMSignatureMethod.getJCAAlgorithm.

Returns the java.security.Signature or javax.crypto.Mac standard algorithm name.

Annotations
@Override