xml.CryptoKey.loadPublic

Loads the public asymmetric RSA or DSA key in the given XML document into the public part of this CryptoKey object, according to the XML-Signature specification for DSA and RSA key value.

Syntax

loadPublic(
   xml xml.DomDocument )

Usage

For Diffie-Hellman, the input parameter is an xml.DomDocument object containing a representation of the Diffie-Hellman key. This method populates the Diffie-Hellman object with the parameters and the public key contained in the given xml.DomDocument according to the XML-Signature specification for the Diffie-Hellman key values. If the public key node exists in the xml document but is empty, it won't be possible to use the key unless the document contains valid modulus and generator parameters and you call generateKey with a size of zero (0). In this case, you won't be in possession of the other peer's public key.

In case of error, the method throws an exception and sets the STATUS variable with the appropriate error number.