Overview | Package | Class | Tree | Deprecated | Index | Help
| Oracle Security Developer Tools XML Security Java API Reference 10g Release 3 (10.1.3) B25383-01
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## oracle.security.xmlsec.keys
Class DHAgreementMethod

`java.lang.Object
oracle.security.xmlsec.util.XMLNode
oracle.security.xmlsec.util.XMLElement
oracle.security.xmlsec.keys.AgreementMethod
oracle.security.xmlsec.keys.DHAgreementMethod`

All Implemented Interfaces:
  KeyInfoData

public class DHAgreementMethod
extends AgreementMethod

This class represents an XML Encyption AgreementMethod element with the Diffie-Hellman protocol.

Since:
  1.1
See Also:
  `AgreementMethod`

Field Summary

Fields inherited from class oracle.security.xmlsec.util.XMLNode
`node, systemId`

Constructor Summary
`DHAgreementMethod(org.w3c.dom.Document doc)` Create an `DHAgreementMethod` instance with the given XML Document context and algorithm URI.
`DHAgreementMethod(org.w3c.dom.Element element)` Create a new `DHAgreementMethod` instance from the given XML element.
`DHAgreementMethod(org.w3c.dom.Element element, java.lang.String systemId)` Create a new `DHAgreementMethod` instance from the given XML element.

Method Summary
`byte[]` | `generateKeyMaterial(XEEncryptionMethod encMtd, oracle.security.crypto.core.PrivateKey loKey, oracle.security.crypto.core.PublicKey opKey)` Generate keying material for the algorithm specified in the given `XEEncryptionMethod` object.
`java.lang.String` | `getType()` Returns the type URI that identifies the specific KeyInfoData subclass.
`void` | `setAlgorithm(java.lang.String algURI)` Throws an Exception if the algorithm URI does not identify Diffie-Hellman key agreement.

Methods inherited from class oracle.security.xmlsec.keys.AgreementMethod
`getAlgorithm, getDigestMethod, getInstance, getInstance, getInstance, getKANonce, getOriginatorKeyInfo, getRecipientKeyInfo, setDigestMethod, setDigestMethod, setKANonce, setOriginatorKeyInfo, setRecipientKeyInfo`

Methods inherited from class oracle.security.xmlsec.util.XMLElement
`addNSPrefixAttr, addNSPrefixAttr, addNSPrefixAttrDefault, addNSPrefixAttrDefault, getAttribute, getAttributeNode, getAttributeNodeNS, getAttributeNS, getChildElementsByTagName, getChildElementsByTagName, getChildElementsByTagNameNS, getChildElementsByTagNameNS, getDefaultNSPrefix, getElementsByTagName, getElementsByTagNameNS, getTagName, hasAttribute, hasAttributeNS, removeAttribute, removeAttributeNode, removeAttributeNS, setAttribute, setAttributeNode, setAttributeNodeNS, setAttributeNS, setDefaultNSPrefix`

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

### DHAgreementMethod

    public DHAgreementMethod(org.w3c.dom.Element element)
                      throws org.w3c.dom.DOMException

  Create a new `DHAgreementMethod` instance from the given XML element.
Parameters:
  `element` - An AgreementMethod element.

### DHAgreementMethod

    public DHAgreementMethod(org.w3c.dom.Element element,
                             java.lang.String systemId)
                      throws org.w3c.dom.DOMException

  Create a new `DHAgreementMethod` instance from the given XML element.
Parameters:
  `element` - An AgreementMethod element.
  `systemId` - The URI string system ID for this element.
Since:
  2.0
See Also:
  `XMLNode.setSystemId(java.lang.String)`

### DHAgreementMethod

    public DHAgreementMethod(org.w3c.dom.Document doc)
                      throws org.w3c.dom.DOMException

  Create an `DHAgreementMethod` instance with the given XML Document context and algorithm URI.
Parameters:
  `doc` - A XML Document to be used as the owner document of this structure.

Method Detail

### setAlgorithm

    public void setAlgorithm(java.lang.String algURI)

  Throws an Exception if the algorithm URI does not identify Diffie-Hellman key agreement.
  Specified by:
    `setAlgorithm` in class `AgreementMethod`
  Parameters:
    `algURI` - The algorithm URI identifying the key agreement algorithm

### getType

    public java.lang.String getType()

  Description copied from interface: `KeyInfoData`
  Returns the type URI that identifies the specific KeyInfoData subclass.

  Interface `XMLURI` contains the KeyInfo data type URIs defined in the XML Signature and XML Encryption namespaces, including:

  - Diffie-Hellman Public Key `XMLURI.obj_DHKeyValue`
  - DSA Public Key `XMLURI.obj_DSAKeyValue`
  - Encrypted Key `XMLURI.obj_EncryptedKey`
  - Key Name `XMLURI.obj_KeyName`
  - Key Management Data `XMLURI.obj_MgmtData`
  - PGP Key Data `XMLURI.obj_PGPData`
  - Raw (base-64 encoded binary) X.509 Certificate `XMLURI.obj_rawX509Certificate`
  - Key Retrieval Method `XMLURI.obj_RetrievalMethod`
  - RSA Public Key `XMLURI.obj_RSAKeyValue`
  - SPKI Key Data `XMLURI.obj_SPKIData`
  - X.509 Key/Certificate Data `XMLURI.obj_X509Data`

### generateKeyMaterial

    public byte[] generateKeyMaterial(XEEncryptionMethod encMtd,
                                      oracle.security.crypto.core.PrivateKey loKey,
                                      oracle.security.crypto.core.PublicKey opKey)
                               throws XESchemaException,
                                      XECipherException

  Generate keying material for the algorithm specified in the given `XEEncryptionMethod` object. The EncryptionMethod element of the `XEEncryptionMethod` object is the child of the EncryptedData or EncryptedKey grandparent of this AgreementMethod element.
  Specified by:
    `generateKeyMaterial` in class `AgreementMethod`
  Parameters:
    `encMtd` - an `XEEncryptionMethod` specifys the encryption algorithm the keying material intended for.
    `loKey` - the local party private key
    `opKey` - the other party public key
  Throws:
    `XESchemaException`
    `XECipherException`

Overview | Package | Class | Tree | Deprecated | Index | Help
| Oracle Security Developer Tools XML Security Java API Reference 10g Release 3 (10.1.3) B25383-01
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2005, 2006 , Oracle. All rights reserved.