public final class DOMPGPData extends DOMStructure implements javax.xml.crypto.dsig.keyinfo.PGPData
Constructor and Description |
---|
DOMPGPData(byte[] keyId,
byte[] keyPacket,
java.util.List<? extends javax.xml.crypto.XMLStructure> other)
Creates a
DOMPGPData containing the specified key id and
optional key packet and list of external elements. |
DOMPGPData(byte[] keyPacket,
java.util.List<? extends javax.xml.crypto.XMLStructure> other)
Creates a
DOMPGPData containing the specified key packet. |
DOMPGPData(org.w3c.dom.Element pdElem)
Creates a
DOMPGPData from an element. |
Modifier and Type | Method and Description |
---|---|
java.util.List |
getExternalElements() |
byte[] |
getKeyId() |
byte[] |
getKeyPacket() |
void |
marshal(org.w3c.dom.Node parent,
java.lang.String dsPrefix,
javax.xml.crypto.dom.DOMCryptoContext context) |
isFeatureSupported
public DOMPGPData(byte[] keyPacket, java.util.List<? extends javax.xml.crypto.XMLStructure> other)
DOMPGPData
containing the specified key packet.
and optional list of external elements.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 XMLStructure
s representing elements from
an external namespace. The list is defensively copied to prevent
subsequent modification. May be null
or empty.java.lang.NullPointerException
- if keyPacket
is
null
java.lang.IllegalArgumentException
- if the key packet is not in the
correct formatjava.lang.ClassCastException
- if other
contains any
entries that are not of type XMLStructure
public DOMPGPData(byte[] keyId, byte[] keyPacket, java.util.List<? extends javax.xml.crypto.XMLStructure> other)
DOMPGPData
containing the specified key id and
optional key packet and list of external elements.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 XMLStructure
s representing elements from
an external namespace. The list is defensively copied to prevent
subsequent modification. May be null
or empty.java.lang.NullPointerException
- if keyId
is null
java.lang.IllegalArgumentException
- if the key id or packet is not in the
correct formatjava.lang.ClassCastException
- if other
contains any
entries that are not of type XMLStructure
public DOMPGPData(org.w3c.dom.Element pdElem) throws javax.xml.crypto.MarshalException
DOMPGPData
from an element.pdElem
- a PGPData elementjavax.xml.crypto.MarshalException
public byte[] getKeyId()
getKeyId
in interface javax.xml.crypto.dsig.keyinfo.PGPData
public byte[] getKeyPacket()
getKeyPacket
in interface javax.xml.crypto.dsig.keyinfo.PGPData
public java.util.List getExternalElements()
getExternalElements
in interface javax.xml.crypto.dsig.keyinfo.PGPData
public void marshal(org.w3c.dom.Node parent, java.lang.String dsPrefix, javax.xml.crypto.dom.DOMCryptoContext context) throws javax.xml.crypto.MarshalException
marshal
in class DOMStructure
javax.xml.crypto.MarshalException