Class DOMDigestMethod
java.lang.Object
org.apache.jcp.xml.dsig.internal.dom.DOMStructure
org.apache.jcp.xml.dsig.internal.dom.DOMDigestMethod
- All Implemented Interfaces:
AlgorithmMethod, DigestMethod, XMLStructure
- Direct Known Subclasses:
DOMDigestMethod.RIPEMD160, DOMDigestMethod.SHA1, DOMDigestMethod.SHA224, DOMDigestMethod.SHA256, DOMDigestMethod.SHA3_224, DOMDigestMethod.SHA3_256, DOMDigestMethod.SHA3_384, DOMDigestMethod.SHA3_512, DOMDigestMethod.SHA384, DOMDigestMethod.SHA512, DOMDigestMethod.WHIRLPOOL
DOM-based abstract implementation of DigestMethod.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescription(package private) static final class(package private) static final class(package private) static final class(package private) static final class(package private) static final class(package private) static final class(package private) static final class(package private) static final class(package private) static final class(package private) static final class(package private) static final class -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate DigestMethodParameterSpec(package private) static final String(package private) static final String(package private) static final String(package private) static final String(package private) static final String(package private) static final String(package private) static final StringFields inherited from interface DigestMethod
RIPEMD160, SHA1, SHA256, SHA512 -
Constructor Summary
ConstructorsConstructorDescriptionCreates aDOMDigestMethod.DOMDigestMethod(Element dmElem) Creates aDOMDigestMethodfrom an element. -
Method Summary
Modifier and TypeMethodDescription(package private) voidcheckParams(DigestMethodParameterSpec params) Checks if the specified parameters are valid for this algorithm.boolean(package private) abstract StringReturns the MessageDigest standard algorithm name.final AlgorithmParameterSpecinthashCode()voidmarshal(Node parent, String prefix, DOMCryptoContext context) This method invokes the abstractmarshalParamsmethod to marshal any algorithm-specific parameters.(package private) voidmarshalParams(Element parent, String prefix) Marshals the algorithm-specific parameters to an Element and appends it to the specified parent element.(package private) static DigestMethod(package private) DigestMethodParameterSpecunmarshalParams(Element paramsElem) UnmarshalsDigestMethodParameterSpecfrom the specifiedElement.Methods inherited from class DOMStructure
isFeatureSupportedMethods inherited from class Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface AlgorithmMethod
getAlgorithmMethods inherited from interface XMLStructure
isFeatureSupported
-
Field Details
-
SHA224
- See Also:
-
SHA384
- See Also:
-
WHIRLPOOL
- See Also:
-
SHA3_224
- See Also:
-
SHA3_256
- See Also:
-
SHA3_384
- See Also:
-
SHA3_512
- See Also:
-
params
-
-
Constructor Details
-
DOMDigestMethod
DOMDigestMethod(AlgorithmParameterSpec params) throws InvalidAlgorithmParameterException Creates aDOMDigestMethod.- Parameters:
params- the algorithm-specific params (may benull)- Throws:
InvalidAlgorithmParameterException- if the parameters are not appropriate for this digest method
-
DOMDigestMethod
DOMDigestMethod(Element dmElem) throws MarshalException Creates aDOMDigestMethodfrom an element. This constructor invokes the abstractunmarshalParamsmethod to unmarshal any algorithm-specific input parameters.- Parameters:
dmElem- a DigestMethod element- Throws:
MarshalException
-
-
Method Details
-
unmarshal
- Throws:
MarshalException
-
checkParams
Checks if the specified parameters are valid for this algorithm. By default, this method throws an exception if parameters are specified since most DigestMethod algorithms do not have parameters. Subclasses should override it if they have parameters.- Parameters:
params- the algorithm-specific params (may benull)- Throws:
InvalidAlgorithmParameterException- if the parameters are not appropriate for this digest method
-
getParameterSpec
- Specified by:
getParameterSpecin interfaceAlgorithmMethod- Specified by:
getParameterSpecin interfaceDigestMethod
-
unmarshalParams
UnmarshalsDigestMethodParameterSpecfrom the specifiedElement. By default, this method throws an exception since most DigestMethod algorithms do not have parameters. Subclasses should override it if they have parameters.- Parameters:
paramsElem- theElementholding the input params- Returns:
- the algorithm-specific
DigestMethodParameterSpec - Throws:
MarshalException- if the parameters cannot be unmarshalled
-
marshal
This method invokes the abstractmarshalParamsmethod to marshal any algorithm-specific parameters.- Specified by:
marshalin classDOMStructure- Throws:
MarshalException
-
equals
-
hashCode
-
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 DigestMethod algorithms do not have parameters. Subclasses should override it if they have parameters.- Parameters:
parent- the parent element to append the parameters toprefix- the namespace prefix to use- Throws:
MarshalException- if the parameters cannot be marshalled
-
getMessageDigestAlgorithm
Returns the MessageDigest standard algorithm name.
-