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 aDOMPGPData
containing the specified key id and optional key packet and list of external elements.DOMPGPData
(byte[] keyPacket, List<? extends XMLStructure> other) Creates aDOMPGPData
containing the specified key packet.DOMPGPData
(Element pdElem) Creates aDOMPGPData
from an element. -
Method Summary
Modifier and TypeMethodDescriptionbyte[]
getKeyId()
byte[]
void
marshal
(Node parent, String dsPrefix, DOMCryptoContext context) Methods inherited from class org.apache.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 Details
-
DOMPGPData
Creates aDOMPGPData
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 ofXMLStructure
s representing elements from an external namespace. The list is defensively copied to prevent subsequent modification. May benull
or empty.- Throws:
NullPointerException
- ifkeyPacket
isnull
IllegalArgumentException
- if the key packet is not in the correct formatClassCastException
- ifother
contains any entries that are not of typeXMLStructure
-
DOMPGPData
Creates aDOMPGPData
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 benull
). The array is cloned to prevent subsequent modification.other
- a list ofXMLStructure
s representing elements from an external namespace. The list is defensively copied to prevent subsequent modification. May benull
or empty.- Throws:
NullPointerException
- ifkeyId
isnull
IllegalArgumentException
- if the key id or packet is not in the correct formatClassCastException
- ifother
contains any entries that are not of typeXMLStructure
-
DOMPGPData
Creates aDOMPGPData
from an element.- Parameters:
pdElem
- a PGPData element- Throws:
MarshalException
-
-
Method Details
-
getKeyId
public byte[] getKeyId() -
getKeyPacket
public byte[] getKeyPacket()- Specified by:
getKeyPacket
in interfacePGPData
-
getExternalElements
- Specified by:
getExternalElements
in interfacePGPData
-
marshal
- Specified by:
marshal
in classDOMStructure
- Throws:
MarshalException
-