public class XSSignatureValue
extends oracle.security.xmlsec.util.XMLElement
XSSignature.createSignatureValue()| Constructor and Description |
|---|
XSSignatureValue(org.w3c.dom.Document owner)
Creates a new
XSSignatureValue instance. |
XSSignatureValue(org.w3c.dom.Document owner,
byte[] sigBytes)
Creates a new
XSSignatureValue instance. |
XSSignatureValue(org.w3c.dom.Document owner,
byte[] sigBytes,
java.lang.String id)
Creates a new
XSSignatureValue instance. |
XSSignatureValue(org.w3c.dom.Document owner,
java.lang.String id)
Creates a new
XSSignatureValue instance. |
XSSignatureValue(org.w3c.dom.Element element)
Creates a new
XSSignatureValue instance
from the given Element node. |
XSSignatureValue(org.w3c.dom.Element element,
java.lang.String systemId)
Creates a new
XSSignatureValue instance
from the given Element node. |
| Modifier and Type | Method and Description |
|---|---|
static byte[] |
fromDSA(byte[] dsaVal)
Wrapper over
fromDSA(byte[], int) with size=20 for SHA-1. |
static byte[] |
fromDSA(byte[] dsaVal,
int size)
Converts a DSA signature value from ASN.1 format to PKCS#1
octet-stream format.
|
java.lang.String |
getId()
Returns the string value of the Id attribute of this SignatureValue, or
null if the attribute is missing. |
byte[] |
getSignatureBytes()
Returns the signature bytes.
|
void |
setId(java.lang.String id)
Sets the Id attribute of this SignatureValue.
|
void |
setSignatureBytes(byte[] sigBytes)
Sets the signature bytes for this SignatureValue element.
|
static byte[] |
toDSA(byte[] sigVal)
Converts a DSA signature value from PKCS#1 octet-stream format
to ASN.1 format.
|
addNSPrefixAttr, addNSPrefixAttr, addNSPrefixAttrDefault, addNSPrefixAttrDefault, getAttribute, getAttributeNode, getAttributeNodeNS, getAttributeNS, getChildElementsByTagName, getChildElementsByTagName, getChildElementsByTagNameNS, getChildElementsByTagNameNS, getDefaultNSPrefix, getElement, getElementsByTagName, getElementsByTagNameNS, getTagName, hasAttribute, hasAttributeNS, removeAttribute, removeAttributeNode, removeAttributeNS, setAttribute, setAttributeNode, setAttributeNodeNS, setAttributeNS, setDefaultNSPrefixappendChild, appendChild, appendTo, cloneNode, getAttributes, getChildNodes, getFirstChild, getLastChild, getLocalName, getNamespaceURI, getNextSibling, getNode, getNodeName, getNodeType, getNodeValue, getOwnerDocument, getParentNode, getPrefix, getPreviousSibling, getSystemId, hasAttributes, hasChildNodes, insertBefore, insertBefore, isSupported, normalize, removeChild, removeChild, replaceChild, replaceChild, setNodeValue, setPrefix, setSystemId, toBytesXML, toStringXMLpublic XSSignatureValue(org.w3c.dom.Element element)
throws org.w3c.dom.DOMException
XSSignatureValue instance
from the given Element node.element - An Element node in the XML document that conforms to
the XML-DSIG SignatureValue schema.org.w3c.dom.DOMExceptionpublic XSSignatureValue(org.w3c.dom.Element element,
java.lang.String systemId)
throws org.w3c.dom.DOMException
XSSignatureValue instance
from the given Element node.element - An Element node in the XML document that conforms to
the XML-DSIG SignatureValue schema.systemId - The URI string system ID for this element.org.w3c.dom.DOMExceptionXMLNode.setSystemId(java.lang.String)public XSSignatureValue(org.w3c.dom.Document owner)
throws org.w3c.dom.DOMException
XSSignatureValue instance.owner - The owner document of the new XSSignatureValueorg.w3c.dom.DOMExceptionpublic XSSignatureValue(org.w3c.dom.Document owner,
java.lang.String id)
throws org.w3c.dom.DOMException
XSSignatureValue instance.owner - The owner document of the new XSSignatureValueid - An optional string ID name for this SignatureValue structure.org.w3c.dom.DOMExceptionpublic XSSignatureValue(org.w3c.dom.Document owner,
byte[] sigBytes)
throws org.w3c.dom.DOMException
XSSignatureValue instance.owner - The owner document of the new XSSignatureValuesigBytes - A byte array containing the signature.org.w3c.dom.DOMExceptionpublic XSSignatureValue(org.w3c.dom.Document owner,
byte[] sigBytes,
java.lang.String id)
throws org.w3c.dom.DOMException
XSSignatureValue instance.owner - The owner document of the new XSSignatureValuesigBytes - A byte array containing the signature.id - An optional string ID name for this SignatureValue structure.org.w3c.dom.DOMExceptionpublic void setId(java.lang.String id)
throws org.w3c.dom.DOMException
org.w3c.dom.DOMExceptionpublic java.lang.String getId()
null if the attribute is missing.public void setSignatureBytes(byte[] sigBytes)
throws org.w3c.dom.DOMException
sigBytes - A byte array containing the signature.org.w3c.dom.DOMExceptionpublic byte[] getSignatureBytes()
throws org.w3c.dom.DOMException
null if none have been set.org.w3c.dom.DOMExceptionpublic static byte[] fromDSA(byte[] dsaVal)
fromDSA(byte[], int) with size=20 for SHA-1.
For SHA2 functions, use that function directly.public static byte[] fromDSA(byte[] dsaVal,
int size)
dsaVal - The bytes of an ASN.1 DER-encoded DSA s Converts a DSA signature value from ASN.1 format to PKCS#1
octet-stream format.dsaVal - Converts a DSA signature value from ASN.1 format to PKCS#1
octet-stream format.dsaVal - The bytes of an ASN.1 DER-encoded DSA signature value of the form
Dss-Sig-Value ::= SEQUENCE {
r INTEGER,
s INTEGER }
.r and s,
each encoded in size bytes as per PKCS#1 and concatenated.public static byte[] toDSA(byte[] sigVal)
sigVal - A byte array containing the DSA signature integer values
r and s, each encoded in 20 bytes
(SHA1 - 20 bytes, SHA256 - 32 bytes) as per PKCS#1 and concatenated.
Dss-Sig-Value ::= SEQUENCE {
r INTEGER,
s INTEGER }
.