org.jcp.xml.dsig.internal.dom
Class DOMPGPData

java.lang.Object
  extended by org.jcp.xml.dsig.internal.dom.DOMStructure
      extended by org.jcp.xml.dsig.internal.dom.DOMPGPData
All Implemented Interfaces:
PGPData, XMLStructure

public final class DOMPGPData
extends DOMStructure
implements PGPData

Disabled: no SafeJ information.

DOM-based implementation of PGPData.


Field Summary
 
Fields inherited from interface javax.xml.crypto.dsig.keyinfo.PGPData
TYPE
 
Constructor Summary
DOMPGPData(byte[] keyId, byte[] keyPacket, List other)
          Creates a DOMPGPData containing the specified key id and optional key packet and list of external elements.
DOMPGPData(byte[] keyPacket, List other)
          Creates a DOMPGPData containing the specified key packet.
DOMPGPData(org.w3c.dom.Element pdElem)
          Creates a DOMPGPData from an element.
 
Method Summary
 List getExternalElements()
          Returns an unmodifiable list of XMLStructures representing elements from an external namespace.
 byte[] getKeyId()
          Returns the PGP public key identifier of this PGPData as defined in RFC 2440, section 11.2.
 byte[] getKeyPacket()
          Returns the PGP key material packet of this PGPData as defined in RFC 2440, section 5.5.
 void marshal(org.w3c.dom.Node parent, String dsPrefix, DOMCryptoContext context)
           
 
Methods inherited from class org.jcp.xml.dsig.internal.dom.DOMStructure
isFeatureSupported
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface javax.xml.crypto.XMLStructure
isFeatureSupported
 

Constructor Detail

DOMPGPData

public DOMPGPData(byte[] keyPacket,
                  List other)
Class is disabled.

Creates a DOMPGPData containing the specified key packet. and optional list of external elements.

Parameters:
keyPacket - a PGP Key Material Packet as defined in section 5.5 of RFC 2440. The array is cloned to prevent subsequent modification.
other - a list of XMLStructures representing elements from an external namespace. The list is defensively copied to prevent subsequent modification. May be null or empty.
Throws:
NullPointerException - if keyPacket is null
IllegalArgumentException - if the key packet is not in the correct format
ClassCastException - if other contains any entries that are not of type XMLStructure

DOMPGPData

public DOMPGPData(byte[] keyId,
                  byte[] keyPacket,
                  List other)
Class is disabled.

Creates a DOMPGPData containing the specified key id and optional key packet and list of external elements.

Parameters:
keyId - a PGP public key id as defined in section 11.2 of RFC 2440. The array is cloned to prevent subsequent modification.
keyPacket - a PGP Key Material Packet as defined in section 5.5 of RFC 2440 (may be null). The array is cloned to prevent subsequent modification.
other - a list of XMLStructures representing elements from an external namespace. The list is defensively copied to prevent subsequent modification. May be null or empty.
Throws:
NullPointerException - if keyId is null
IllegalArgumentException - if the key id or packet is not in the correct format
ClassCastException - if other contains any entries that are not of type XMLStructure

DOMPGPData

public DOMPGPData(org.w3c.dom.Element pdElem)
           throws MarshalException
Class is disabled.

Creates a DOMPGPData from an element.

Parameters:
pdElem - a PGPData element
Throws:
MarshalException
Method Detail

getKeyId

public byte[] getKeyId()
Class is disabled.

Description copied from interface: PGPData
Returns the PGP public key identifier of this PGPData as defined in RFC 2440, section 11.2.

Specified by:
getKeyId in interface PGPData
Returns:
the PGP public key identifier (may be null if not specified). Each invocation of this method returns a new clone to protect against subsequent modification.

getKeyPacket

public byte[] getKeyPacket()
Class is disabled.

Description copied from interface: PGPData
Returns the PGP key material packet of this PGPData as defined in RFC 2440, section 5.5.

Specified by:
getKeyPacket in interface PGPData
Returns:
the PGP key material packet (may be null if not specified). Each invocation of this method returns a new clone to protect against subsequent modification.

getExternalElements

public List getExternalElements()
Class is disabled.

Description copied from interface: PGPData
Returns an unmodifiable list of XMLStructures representing elements from an external namespace.

Specified by:
getExternalElements in interface PGPData
Returns:
an unmodifiable list of XMLStructures (may be empty, but never null)

marshal

public void marshal(org.w3c.dom.Node parent,
                    String dsPrefix,
                    DOMCryptoContext context)
             throws MarshalException
Class is disabled.

Specified by:
marshal in class DOMStructure
Throws:
MarshalException