|
Oracle Security Developer Tools XML Security Java API Reference 11g (11.1.1) E10680-02 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object
oracle.security.xmlsec.util.XMLNode
oracle.security.xmlsec.util.XMLElement
oracle.security.xmlsec.dsig.XSSignatureValue
public class XSSignatureValue
Class representing a XML-DSIG SignatureValue element.
XSSignature.createSignatureValue()
Field Summary |
---|
Fields inherited from class oracle.security.xmlsec.util.XMLNode |
---|
node, systemId |
Constructor Summary | |
---|---|
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. |
Method Summary | |
---|---|
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. |
Methods inherited from class oracle.security.xmlsec.util.XMLNode |
---|
appendChild, 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, toStringXML |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public 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.DOMException
public 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.DOMException
XMLNode.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 XSSignatureValue
org.w3c.dom.DOMException
public XSSignatureValue(org.w3c.dom.Document owner, java.lang.String id) throws org.w3c.dom.DOMException
XSSignatureValue
instance.
owner
- The owner document of the new XSSignatureValue
id
- An optional string ID name for this SignatureValue structure.org.w3c.dom.DOMException
public XSSignatureValue(org.w3c.dom.Document owner, byte[] sigBytes) throws org.w3c.dom.DOMException
XSSignatureValue
instance.
owner
- The owner document of the new XSSignatureValue
sigBytes
- A byte array containing the signature.org.w3c.dom.DOMException
public 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 XSSignatureValue
sigBytes
- A byte array containing the signature.id
- An optional string ID name for this SignatureValue structure.org.w3c.dom.DOMException
Method Detail |
---|
public void setId(java.lang.String id) throws org.w3c.dom.DOMException
org.w3c.dom.DOMException
public 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.DOMException
public byte[] getSignatureBytes() throws org.w3c.dom.DOMException
null
if none have been set.org.w3c.dom.DOMException
public 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 }.
|
Oracle Security Developer Tools XML Security Java API Reference 11g (11.1.1) E10680-02 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |