public abstract class AgreementMethod extends XMLElement implements KeyInfoData
DHAgreementMethod
Modifier | Constructor and Description |
---|---|
protected |
AgreementMethod(org.w3c.dom.Document doc, java.lang.String algURI)
Create an
AgreementMethod instance with the given XML Document context and algorithm URI. |
protected |
AgreementMethod(org.w3c.dom.Element element)
Create a new
AgreementMethod instance from the given XML element. |
protected |
AgreementMethod(org.w3c.dom.Element element, java.lang.String systemId)
Create a new
AgreementMethod instance from the given XML element. |
Modifier and Type | Method and Description |
---|---|
abstract 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 |
getAlgorithm()
Get the algorithm URI for the key agreement algorithm to be used.
|
XSAlgorithmIdentifier |
getDigestMethod()
Return message digest algorithm URI.
|
static AgreementMethod |
getInstance(org.w3c.dom.Document doc, java.lang.String algURI)
Create a new
AgreementMethod instance from the given XML owner document and algorithm URI. |
static AgreementMethod |
getInstance(org.w3c.dom.Element element)
Create a new
AgreementMethod instance from the given XML Element. |
static AgreementMethod |
getInstance(org.w3c.dom.Element element, java.lang.String systemId)
Create a new
AgreementMethod instance from the given XML Element. |
byte[] |
getKANonce()
Return the KA-Nonce value.
|
KeyDerivationMethod |
getKeyDerivationMethod()
Get the KeyDerivationMethod
|
OriginatorKeyInfo |
getOriginatorKeyInfo()
Return the
OriginatorKeyInfo object in this structure. |
RecipientKeyInfo |
getRecipientKeyInfo()
Return the
RecipientKeyInfo object in this structure. |
abstract void |
setAlgorithm(java.lang.String algURI)
Set the algorithm URI attribute for this AgreementMethod element.
|
void |
setDigestMethod(java.lang.String digestMethod)
Set the DigestMethod child element for this AgreementMethod element with the given message digest algorithm URI.
|
void |
setDigestMethod(XSAlgorithmIdentifier digestMethod)
Set the DigestMethod child element for this AgreementMethod element with the given message digest algorithm.
|
void |
setKANonce(byte[] nonce)
Set the KA-Nonce child element for this AgreementMethod element with the given bytes.
|
void |
setKeyDerivationMethod(KeyDerivationMethod keyDerivationMethod)
Set the KeyDerivationMethod
|
void |
setOriginatorKeyInfo(OriginatorKeyInfo oriKeyInfo)
Set the OriginatorKeyInfo child element for this AgreementMethod element.
|
void |
setRecipientKeyInfo(RecipientKeyInfo reciKeyInfo)
Set the RecipientKeyInfo child element for this AgreementMethod element.
|
abstract java.security.KeyPair |
setToDefaultParameters(java.security.KeyPair originatorKeyPair, java.security.PublicKey recipientKey, java.lang.String keyDerivationAlgURI)
Populate the AgreementMethod with default values
|
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
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getType
protected AgreementMethod(org.w3c.dom.Element element) throws org.w3c.dom.DOMException
AgreementMethod
instance from the given XML element.element
- An AgreementMethod element.org.w3c.dom.DOMException
protected AgreementMethod(org.w3c.dom.Element element, java.lang.String systemId) throws org.w3c.dom.DOMException
AgreementMethod
instance from the given XML element.element
- An AgreementMethod element.systemId
- The URI string system ID for the AgreementMethod
.org.w3c.dom.DOMException
protected AgreementMethod(org.w3c.dom.Document doc, java.lang.String algURI) throws org.w3c.dom.DOMException
AgreementMethod
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 static AgreementMethod getInstance(org.w3c.dom.Document doc, java.lang.String algURI) throws org.w3c.dom.DOMException
AgreementMethod
instance from the given XML owner document and algorithm URI.doc
- An XML Document to be used as the owner document of this structure.algURI
- The algorithm URI identifying the key agreement algorithm. Standard key agreement algorithm URI constants can be found in XMLURI
, including:
XMLURI.alg_dh
AgreementMethod
instance.org.w3c.dom.DOMException
public static AgreementMethod getInstance(org.w3c.dom.Element element) throws org.w3c.dom.DOMException
AgreementMethod
instance from the given XML Element.element
- An AgreementMethod element.AgreementMethod
instance.org.w3c.dom.DOMException
public static AgreementMethod getInstance(org.w3c.dom.Element element, java.lang.String systemId) throws org.w3c.dom.DOMException
AgreementMethod
instance from the given XML Element.element
- An AgreementMethod element.systemId
- The URI string system ID for the AgreementMethod
.AgreementMethod
instance.org.w3c.dom.DOMException
public abstract void setAlgorithm(java.lang.String algURI)
algURI
- The algorithm URI identifying the key agreement algorithmpublic java.lang.String getAlgorithm()
null
if it is missing.public void setKANonce(byte[] nonce) throws org.w3c.dom.DOMException
nonce
- The key agreement nonce value.org.w3c.dom.DOMException
public byte[] getKANonce()
null
if not specified.public void setDigestMethod(java.lang.String digestMethod) throws org.w3c.dom.DOMException
digestMethod
- The algorithm URI for the digest algorithmorg.w3c.dom.DOMException
public void setDigestMethod(XSAlgorithmIdentifier digestMethod) throws org.w3c.dom.DOMException
digestMethod
- The XSAlgorithmIdentifier
for the digest algorithmorg.w3c.dom.DOMException
public XSAlgorithmIdentifier getDigestMethod()
public void setKeyDerivationMethod(KeyDerivationMethod keyDerivationMethod)
keyDerivationMethod
-public KeyDerivationMethod getKeyDerivationMethod()
public void setOriginatorKeyInfo(OriginatorKeyInfo oriKeyInfo)
oriKeyInfo
- An OriginatorKeyInfo
objectpublic OriginatorKeyInfo getOriginatorKeyInfo()
OriginatorKeyInfo
object in this structure.OriginatorKeyInfo
object.public void setRecipientKeyInfo(RecipientKeyInfo reciKeyInfo)
reciKeyInfo
- An RecipientKeyInfo
objectpublic RecipientKeyInfo getRecipientKeyInfo()
RecipientKeyInfo
object in this structure.RecipientKeyInfo
object.public abstract byte[] generateKeyMaterial(XEEncryptionMethod encMtd, java.security.PrivateKey loKey, java.security.PublicKey opKey) throws XESchemaException, XECipherException
XEEncryptionMethod
object.encMtd
- An XEEncryptionMethod
specifys the encryption algorithm the keying material intended for.loKey
- The local party private key.opKey
- The other party public key.XESchemaException
XECipherException
public abstract java.security.KeyPair setToDefaultParameters(java.security.KeyPair originatorKeyPair, java.security.PublicKey recipientKey, java.lang.String keyDerivationAlgURI) throws XECipherException
originatorKeyPair
-recipientKey
-keyDerivationAlgURI
-XECipherException