- java.lang.Object
-
- org.apache.jcp.xml.dsig.internal.dom.DOMStructure
-
- org.apache.jcp.xml.dsig.internal.dom.DOMPGPData
-
- All Implemented Interfaces:
PGPData,XMLStructure
public final class DOMPGPData extends DOMStructure implements PGPData
DOM-based implementation of PGPData.
-
-
Constructor Summary
Constructors Constructor Description DOMPGPData(byte[] keyId, byte[] keyPacket, List<? extends XMLStructure> other)Creates aDOMPGPDatacontaining the specified key id and optional key packet and list of external elements.DOMPGPData(byte[] keyPacket, List<? extends XMLStructure> other)Creates aDOMPGPDatacontaining the specified key packet.DOMPGPData(Element pdElem)Creates aDOMPGPDatafrom an element.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description List<XMLStructure>getExternalElements()byte[]getKeyId()byte[]getKeyPacket()voidmarshal(Node parent, String dsPrefix, DOMCryptoContext context)-
Methods inherited from class org.apache.jcp.xml.dsig.internal.dom.DOMStructure
equalsContent, 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<? extends 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:
NullPointerException- ifkeyPacketisnullIllegalArgumentException- if the key packet is not in the correct formatClassCastException- ifothercontains any entries that are not of typeXMLStructure
-
DOMPGPData
public DOMPGPData(byte[] keyId, byte[] keyPacket, List<? extends 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:
NullPointerException- ifkeyIdisnullIllegalArgumentException- if the key id or packet is not in the correct formatClassCastException- ifothercontains any entries that are not of typeXMLStructure
-
DOMPGPData
public DOMPGPData(Element pdElem) throws MarshalException
Creates aDOMPGPDatafrom an element.- Parameters:
pdElem- a PGPData element- Throws:
MarshalException
-
-
Method Detail
-
getKeyPacket
public byte[] getKeyPacket()
- Specified by:
getKeyPacketin interfacePGPData
-
getExternalElements
public List<XMLStructure> getExternalElements()
- Specified by:
getExternalElementsin interfacePGPData
-
marshal
public void marshal(Node parent, String dsPrefix, DOMCryptoContext context) throws MarshalException
- Specified by:
marshalin classDOMStructure- Throws:
MarshalException
-
-