Class DOMPGPData
java.lang.Object
org.apache.jcp.xml.dsig.internal.dom.DOMStructure
org.apache.jcp.xml.dsig.internal.dom.DOMPGPData
- All Implemented Interfaces:
PGPData,XMLStructure
DOM-based implementation of PGPData.
-
Field Summary
-
Constructor Summary
ConstructorsConstructorDescriptionDOMPGPData(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
Modifier and TypeMethodDescriptionbyte[]getKeyId()byte[]voidmarshal(Node parent, String dsPrefix, DOMCryptoContext context) Methods inherited from class org.apache.jcp.xml.dsig.internal.dom.DOMStructure
isFeatureSupportedMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface javax.xml.crypto.XMLStructure
isFeatureSupported
-
Constructor Details
-
DOMPGPData
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
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
Creates aDOMPGPDatafrom an element.- Parameters:
pdElem- a PGPData element- Throws:
MarshalException
-
-
Method Details
-
getKeyId
public byte[] getKeyId() -
getKeyPacket
public byte[] getKeyPacket()- Specified by:
getKeyPacketin interfacePGPData
-
getExternalElements
- Specified by:
getExternalElementsin interfacePGPData
-
marshal
- Specified by:
marshalin classDOMStructure- Throws:
MarshalException
-