Class SignatureImpl
java.lang.Object
org.opensaml.core.xml.AbstractXMLObject
org.opensaml.xmlsec.signature.impl.SignatureImpl
XMLObject representing an enveloped or detached XML Digital Signature, version 20020212, Signature element.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate String
Canonicalization algorithm used in signature.private List<ContentReference>
References to content to be signed.private Integer
Optional HMAC output length parameter to the signature algorithm.private KeyInfo
Public key information to embed in the signature.private String
Algorithm used to generate the signature.private Credential
Key used to sign the signature.private org.apache.xml.security.signature.XMLSignature
Constructed Apache XML Security signature object.Fields inherited from interface org.opensaml.xmlsec.signature.Signature
DEFAULT_ELEMENT_LOCAL_NAME, DEFAULT_ELEMENT_NAME, TYPE_LOCAL_NAME, TYPE_NAME
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
SignatureImpl
(String namespaceURI, String elementLocalName, String namespacePrefix) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionGets the canonicalization algorithm used to create the signature content.Gets the list of signature content references.Gets the HMAC output length value, optionally used when signing with an HMAC signature algorithm.Gets the key info added to this signature.Gets an unmodifiable list of child elements in the order that they will appear in the DOM.Gets the algorithm used to compute the signature.Gets the signature signing credential.org.apache.xml.security.signature.XMLSignature
Get the Apache XML Security signature instance held by this object.void
Releases the DOM representation of this XMLObject, if there is one.void
setCanonicalizationAlgorithm
(String newAlgorithm) Sets the canonicalization algorithm used to create the signature content.void
setHMACOutputLength
(Integer length) Sets the HMAC output length value, optionally used when signing with an HMAC signature algorithm.void
setKeyInfo
(KeyInfo newKeyInfo) Sets the key info added to this signature.void
setSignatureAlgorithm
(String newAlgorithm) Sets the algorithm used to compute the signature.void
setSigningCredential
(Credential newCredential) Sets the signature signing credential.void
setXMLSignature
(org.apache.xml.security.signature.XMLSignature signature) Set the Apache XML Security signature instance held by this object.Methods inherited from class org.opensaml.core.xml.AbstractXMLObject
detach, getDOM, getElementQName, getIDIndex, getNamespaceManager, getNamespaces, getNoNamespaceSchemaLocation, getObjectMetadata, getParent, getSchemaLocation, getSchemaType, hasChildren, hasParent, isNil, isNilXSBoolean, manageQualifiedAttributeNamespace, prepareAttributeValueForAssignment, prepareElementContentForAssignment, prepareForAssignment, prepareForAssignment, prepareForAssignment, registerOwnID, releaseChildrenDOM, releaseParentDOM, releaseThisAndChildrenDOM, releaseThisandParentDOM, resolveID, resolveIDFromRoot, setDOM, setElementNamespacePrefix, setElementQName, setNil, setNil, setNoNamespaceSchemaLocation, setParent, setSchemaLocation, setSchemaType
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.opensaml.core.xml.XMLObject
detach, getDOM, getElementQName, getIDIndex, getNamespaceManager, getNamespaces, getNoNamespaceSchemaLocation, getObjectMetadata, getParent, getSchemaLocation, getSchemaType, hasChildren, hasParent, isNil, isNilXSBoolean, releaseChildrenDOM, releaseParentDOM, resolveID, resolveIDFromRoot, setDOM, setNil, setNil, setNoNamespaceSchemaLocation, setParent, setSchemaLocation
-
Field Details
-
canonicalizationAlgorithm
Canonicalization algorithm used in signature. -
signatureAlgorithm
Algorithm used to generate the signature. -
hmacOutputLength
Optional HMAC output length parameter to the signature algorithm. -
signingCredential
Key used to sign the signature. -
keyInfo
Public key information to embed in the signature. -
contentReferences
References to content to be signed. -
xmlSignature
private org.apache.xml.security.signature.XMLSignature xmlSignatureConstructed Apache XML Security signature object.
-
-
Constructor Details
-
SignatureImpl
Constructor.- Parameters:
namespaceURI
- the namespace the element is inelementLocalName
- the local name of the XML element this Object representsnamespacePrefix
- the prefix for the given namespace
-
-
Method Details
-
getCanonicalizationAlgorithm
Gets the canonicalization algorithm used to create the signature content.- Specified by:
getCanonicalizationAlgorithm
in interfaceSignature
- Returns:
- the canonicalization algorithm used to create the signature content
-
setCanonicalizationAlgorithm
Sets the canonicalization algorithm used to create the signature content.- Specified by:
setCanonicalizationAlgorithm
in interfaceSignature
- Parameters:
newAlgorithm
- the canonicalization algorithm used to create the signature content
-
getSignatureAlgorithm
Gets the algorithm used to compute the signature.- Specified by:
getSignatureAlgorithm
in interfaceSignature
- Returns:
- the algorithm used to compute the signature
-
setSignatureAlgorithm
Sets the algorithm used to compute the signature.- Specified by:
setSignatureAlgorithm
in interfaceSignature
- Parameters:
newAlgorithm
- the algorithm used to compute the signature
-
getHMACOutputLength
Gets the HMAC output length value, optionally used when signing with an HMAC signature algorithm.- Specified by:
getHMACOutputLength
in interfaceSignature
- Returns:
- the HMACOutputLength value
-
setHMACOutputLength
Sets the HMAC output length value, optionally used when signing with an HMAC signature algorithm.- Specified by:
setHMACOutputLength
in interfaceSignature
- Parameters:
length
- the new HMACOutputLength value
-
getSigningCredential
Gets the signature signing credential.- Specified by:
getSigningCredential
in interfaceSignature
- Returns:
- the signature signing credential
-
setSigningCredential
Sets the signature signing credential.- Specified by:
setSigningCredential
in interfaceSignature
- Parameters:
newCredential
- the signature signing credential
-
getKeyInfo
Gets the key info added to this signature.- Specified by:
getKeyInfo
in interfaceSignature
- Returns:
- the key info added to this signature
-
setKeyInfo
Sets the key info added to this signature.- Specified by:
setKeyInfo
in interfaceSignature
- Parameters:
newKeyInfo
- the key info added to this signature
-
getContentReferences
Gets the list of signature content references.- Specified by:
getContentReferences
in interfaceSignature
- Returns:
- the list of signature content references
-
getOrderedChildren
Gets an unmodifiable list of child elements in the order that they will appear in the DOM.- Specified by:
getOrderedChildren
in interfaceXMLObject
- Returns:
- ordered list of child elements
-
releaseDOM
public void releaseDOM()Releases the DOM representation of this XMLObject, if there is one.- Specified by:
releaseDOM
in interfaceXMLObject
- Overrides:
releaseDOM
in classAbstractXMLObject
-
getXMLSignature
public org.apache.xml.security.signature.XMLSignature getXMLSignature()Get the Apache XML Security signature instance held by this object.- Returns:
- an Apache XML Security signature object
-
setXMLSignature
public void setXMLSignature(org.apache.xml.security.signature.XMLSignature signature) Set the Apache XML Security signature instance held by this object.- Parameters:
signature
- an Apache XML Security signature object
-