Class DOMKeyValue<K extends java.security.PublicKey>
- java.lang.Object
-
- org.apache.jcp.xml.dsig.internal.dom.DOMStructure
-
- org.apache.jcp.xml.dsig.internal.dom.DOMKeyValue<K>
-
- All Implemented Interfaces:
javax.xml.crypto.dsig.keyinfo.KeyValue,javax.xml.crypto.XMLStructure
- Direct Known Subclasses:
DOMKeyValue.DSA,DOMKeyValue.EC,DOMKeyValue.RSA,DOMKeyValue.Unknown
public abstract class DOMKeyValue<K extends java.security.PublicKey> extends DOMStructure implements javax.xml.crypto.dsig.keyinfo.KeyValue
DOM-based implementation of KeyValue.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description (package private) static classDOMKeyValue.DSA(package private) static classDOMKeyValue.EC(package private) static classDOMKeyValue.RSA(package private) static classDOMKeyValue.Unknown
-
Field Summary
Fields Modifier and Type Field Description private KpublicKeyprivate static java.lang.StringXMLDSIG_11_XMLNS
-
Constructor Summary
Constructors Constructor Description DOMKeyValue(K key)DOMKeyValue(org.w3c.dom.Element kvtElem)Creates aDOMKeyValuefrom an element.
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description private static java.math.BigIntegerbigInt(java.lang.String s)static java.math.BigIntegerdecode(org.w3c.dom.Element elem)booleanequals(java.lang.Object obj)private static java.security.PublicKeygeneratePublicKey(java.security.KeyFactory kf, java.security.spec.KeySpec keyspec)java.security.PublicKeygetPublicKey()inthashCode()voidmarshal(org.w3c.dom.Node parent, java.lang.String dsPrefix, javax.xml.crypto.dom.DOMCryptoContext context)(package private) abstract voidmarshalPublicKey(org.w3c.dom.Node parent, org.w3c.dom.Document doc, java.lang.String dsPrefix, javax.xml.crypto.dom.DOMCryptoContext context)(package private) static javax.xml.crypto.dsig.keyinfo.KeyValueunmarshal(org.w3c.dom.Element kvElem)(package private) abstract KunmarshalKeyValue(org.w3c.dom.Element kvtElem)-
Methods inherited from class org.apache.jcp.xml.dsig.internal.dom.DOMStructure
isFeatureSupported
-
-
-
-
Field Detail
-
XMLDSIG_11_XMLNS
private static final java.lang.String XMLDSIG_11_XMLNS
- See Also:
- Constant Field Values
-
publicKey
private final K extends java.security.PublicKey publicKey
-
-
Constructor Detail
-
DOMKeyValue
public DOMKeyValue(K key) throws java.security.KeyException
- Throws:
java.security.KeyException
-
DOMKeyValue
public DOMKeyValue(org.w3c.dom.Element kvtElem) throws javax.xml.crypto.MarshalExceptionCreates aDOMKeyValuefrom an element.- Parameters:
kvtElem- a KeyValue child element- Throws:
javax.xml.crypto.MarshalException
-
-
Method Detail
-
unmarshal
static javax.xml.crypto.dsig.keyinfo.KeyValue unmarshal(org.w3c.dom.Element kvElem) throws javax.xml.crypto.MarshalException- Throws:
javax.xml.crypto.MarshalException
-
getPublicKey
public java.security.PublicKey getPublicKey() throws java.security.KeyException- Specified by:
getPublicKeyin interfacejavax.xml.crypto.dsig.keyinfo.KeyValue- Throws:
java.security.KeyException
-
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
-
marshalPublicKey
abstract void marshalPublicKey(org.w3c.dom.Node parent, org.w3c.dom.Document doc, java.lang.String dsPrefix, javax.xml.crypto.dom.DOMCryptoContext context) throws javax.xml.crypto.MarshalException- Throws:
javax.xml.crypto.MarshalException
-
unmarshalKeyValue
abstract K unmarshalKeyValue(org.w3c.dom.Element kvtElem) throws javax.xml.crypto.MarshalException
- Throws:
javax.xml.crypto.MarshalException
-
generatePublicKey
private static java.security.PublicKey generatePublicKey(java.security.KeyFactory kf, java.security.spec.KeySpec keyspec)
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equalsin classjava.lang.Object
-
decode
public static java.math.BigInteger decode(org.w3c.dom.Element elem) throws javax.xml.crypto.MarshalException- Throws:
javax.xml.crypto.MarshalException
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
bigInt
private static java.math.BigInteger bigInt(java.lang.String s)
-
-