public class DHAgreementMethod extends AgreementMethod
AgreementMethod
Constructor and Description |
---|
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. |
Modifier and Type | Method and Description |
---|---|
byte[] |
generateKeyMaterial(XEEncryptionMethod encMtd, java.security.PrivateKey loKey, java.security.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.
|
java.security.KeyPair |
setToDefaultParameters(java.security.KeyPair originatorKeyPair, java.security.PublicKey recipientKey, java.lang.String keyDerivationAlgURI)
Populate the AgreementMethod with default values
|
getAlgorithm, getDigestMethod, getInstance, getInstance, getInstance, getKANonce, getKeyDerivationMethod, getOriginatorKeyInfo, getRecipientKeyInfo, setDigestMethod, setDigestMethod, setKANonce, setKeyDerivationMethod, setOriginatorKeyInfo, setRecipientKeyInfo
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, setDefaultNSPrefix
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
public DHAgreementMethod(org.w3c.dom.Element element) throws org.w3c.dom.DOMException
DHAgreementMethod
instance from the given XML element.element
- An AgreementMethod element.org.w3c.dom.DOMException
public DHAgreementMethod(org.w3c.dom.Element element, java.lang.String systemId) throws org.w3c.dom.DOMException
DHAgreementMethod
instance from the given XML element.element
- An AgreementMethod element.systemId
- The URI string system ID for this element.org.w3c.dom.DOMException
XMLNode.setSystemId(java.lang.String)
public DHAgreementMethod(org.w3c.dom.Document doc) throws org.w3c.dom.DOMException
DHAgreementMethod
instance with the given XML Document context and algorithm URI.doc
- A XML Document to be used as the owner document of this structure.algURI
- The algorithm URI identifying the key agreement algorithmorg.w3c.dom.DOMException
public void setAlgorithm(java.lang.String algURI)
setAlgorithm
in class AgreementMethod
algURI
- The algorithm URI identifying the key agreement algorithmpublic java.lang.String getType()
KeyInfoData
Interface XMLURI
contains the KeyInfo data type URIs defined in the XML Signature and XML Encryption namespaces, including:
XMLURI.obj_DHKeyValue
XMLURI.obj_DSAKeyValue
XMLURI.obj_EncryptedKey
XMLURI.obj_KeyName
XMLURI.obj_MgmtData
XMLURI.obj_PGPData
XMLURI.obj_rawX509Certificate
XMLURI.obj_RetrievalMethod
XMLURI.obj_RSAKeyValue
XMLURI.obj_SPKIData
XMLURI.obj_X509Data
public byte[] generateKeyMaterial(XEEncryptionMethod encMtd, java.security.PrivateKey loKey, java.security.PublicKey opKey) throws XESchemaException, XECipherException
XEEncryptionMethod
object. The EncryptionMethod element of the XEEncryptionMethod
object is the child of the EncryptedData or EncryptedKey grandparent of this AgreementMethod element.generateKeyMaterial
in class AgreementMethod
encMtd
- an XEEncryptionMethod
specifys the encryption algorithm the keying material intended for.loKey
- the local party private keyopKey
- the other party public keyXESchemaException
XECipherException
public java.security.KeyPair setToDefaultParameters(java.security.KeyPair originatorKeyPair, java.security.PublicKey recipientKey, java.lang.String keyDerivationAlgURI) throws XECipherException
AgreementMethod
setToDefaultParameters
in class AgreementMethod
XECipherException