org.jcp.xml.dsig.internal.dom
Class DOMPGPData
- java.lang.Object
-
- org.jcp.xml.dsig.internal.dom.DOMStructure
-
- org.jcp.xml.dsig.internal.dom.DOMPGPData
-
- All Implemented Interfaces:
- javax.xml.crypto.dsig.keyinfo.PGPData, javax.xml.crypto.XMLStructure
public final class DOMPGPData extends DOMStructure implements javax.xml.crypto.dsig.keyinfo.PGPData
DOM-based implementation of PGPData.
-
-
Constructor Summary
Constructors Constructor and Description DOMPGPData(byte[] keyId, byte[] keyPacket, java.util.List<? extends javax.xml.crypto.XMLStructure> other)Creates aDOMPGPDatacontaining 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 aDOMPGPDatacontaining the specified key packet.DOMPGPData(org.w3c.dom.Element pdElem)Creates aDOMPGPDatafrom an element.
-
Method Summary
Methods Modifier and Type Method and Description java.util.ListgetExternalElements()byte[]getKeyId()byte[]getKeyPacket()voidmarshal(org.w3c.dom.Node parent, java.lang.String dsPrefix, javax.xml.crypto.dom.DOMCryptoContext context)-
Methods inherited from class org.jcp.xml.dsig.internal.dom.DOMStructure
isFeatureSupported
-
-
-
-
Constructor Detail
-
DOMPGPData
public DOMPGPData(byte[] keyPacket, java.util.List<? extends javax.xml.crypto.XMLStructure> other)Creates aDOMPGPDatacontaining 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 ofXMLStructures representing elements from an external namespace. The list is defensively copied to prevent subsequent modification. May benullor empty.- Throws:
java.lang.NullPointerException- ifkeyPacketisnulljava.lang.IllegalArgumentException- if the key packet is not in the correct formatjava.lang.ClassCastException- ifothercontains any entries that are not of typeXMLStructure
-
DOMPGPData
public DOMPGPData(byte[] keyId, byte[] keyPacket, java.util.List<? extends javax.xml.crypto.XMLStructure> other)Creates aDOMPGPDatacontaining 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 benull). The array is cloned to prevent subsequent modification.other- a list ofXMLStructures representing elements from an external namespace. The list is defensively copied to prevent subsequent modification. May benullor empty.- Throws:
java.lang.NullPointerException- ifkeyIdisnulljava.lang.IllegalArgumentException- if the key id or packet is not in the correct formatjava.lang.ClassCastException- ifothercontains any entries that are not of typeXMLStructure
-
DOMPGPData
public DOMPGPData(org.w3c.dom.Element pdElem) throws javax.xml.crypto.MarshalExceptionCreates aDOMPGPDatafrom an element.- Parameters:
pdElem- a PGPData element- Throws:
javax.xml.crypto.MarshalException
-
-
Method Detail
-
getKeyId
public byte[] getKeyId()
- Specified by:
getKeyIdin interfacejavax.xml.crypto.dsig.keyinfo.PGPData
-
getKeyPacket
public byte[] getKeyPacket()
- Specified by:
getKeyPacketin interfacejavax.xml.crypto.dsig.keyinfo.PGPData
-
getExternalElements
public java.util.List getExternalElements()
- Specified by:
getExternalElementsin interfacejavax.xml.crypto.dsig.keyinfo.PGPData
-
marshal
public void marshal(org.w3c.dom.Node parent, java.lang.String dsPrefix, javax.xml.crypto.dom.DOMCryptoContext context) throws javax.xml.crypto.MarshalException- Specified by:
marshalin classDOMStructure- Throws:
javax.xml.crypto.MarshalException
-
-