public class KeyInfoFactory extends KeyInfoFactory
KeyInfoFactory
that supports the DOM XML representation and processing mechanism.| Constructor and Description |
|---|
KeyInfoFactory() |
| Modifier and Type | Method and Description |
|---|---|
URIDereferencer |
getURIDereferencer()
Returns a reference to the
URIDereferencer that is used by
default to dereference URIs in RetrievalMethod objects. |
boolean |
isFeatureSupported(String arg0)
Indicates whether a specified feature is supported.
|
KeyInfo |
newKeyInfo(List content)
Creates a
KeyInfo containing the specified list of key
information types. |
KeyInfo |
newKeyInfo(List content,
String id)
Creates a
KeyInfo containing the specified list of key
information types and optional id. |
KeyName |
newKeyName(String name)
Creates a
KeyName from the specified name. |
KeyValue |
newKeyValue(PublicKey key)
Creates a
KeyValue from the specified public key. |
PGPData |
newPGPData(byte[] keyId)
Creates a
PGPData from the specified PGP public key
identifier. |
PGPData |
newPGPData(byte[] keyId,
byte[] keyPacket,
List other)
Creates a
PGPData from the specified PGP public key
identifier, and optional key material packet and list of external elements. |
PGPData |
newPGPData(byte[] keyPacket,
List other)
Creates a
PGPData from the specified PGP key material packet
and optional list of external elements. |
RetrievalMethod |
newRetrievalMethod(String uri)
Creates a
RetrievalMethod from the specified URI. |
RetrievalMethod |
newRetrievalMethod(String uri,
String type,
List transforms)
Creates a
RetrievalMethod from the specified parameters. |
X509Data |
newX509Data(List content)
Creates a
X509Data containing the specified list of X.509
content. |
X509IssuerSerial |
newX509IssuerSerial(String issuerName,
BigInteger serialNumber)
Creates an
X509IssuerSerial from the specified X.500 issuer
distinguished name and serial number. |
KeyInfo |
unmarshalKeyInfo(XMLStructure xmlStructure)
Unmarshals a new
KeyInfo instance from a mechanism-specific
XMLStructure (ex: DOMStructure)
instance. |
getInstance, getInstance, getInstance, getInstance, getMechanismType, getProviderpublic KeyInfo newKeyInfo(List content)
javax.xml.crypto.dsig.keyinfo.KeyInfoFactoryKeyInfo containing the specified list of key
information types.newKeyInfo in class KeyInfoFactorycontent - a list of one or more XMLStructures
representing key information types. The list is defensively copied
to protect against subsequent modification.KeyInfoKeyInfoFactory.newKeyInfo(java.util.List)public KeyInfo newKeyInfo(List content, String id)
javax.xml.crypto.dsig.keyinfo.KeyInfoFactoryKeyInfo containing the specified list of key
information types and optional id. The id parameter represents
the value of an XML ID attribute and is useful for referencing
the KeyInfo from other XML structures.newKeyInfo in class KeyInfoFactorycontent - a list of one or more XMLStructures
representing key information types. The list is defensively copied
to protect against subsequent modification.id - the value of an XML ID (may be null)KeyInfoKeyInfoFactory.newKeyInfo(java.util.List,
java.lang.String)public KeyName newKeyName(String name)
javax.xml.crypto.dsig.keyinfo.KeyInfoFactoryKeyName from the specified name.newKeyName in class KeyInfoFactoryname - the name that identifies the keyKeyNameKeyInfoFactory.newKeyName(java.lang.String)public KeyValue newKeyValue(PublicKey key) throws KeyException
javax.xml.crypto.dsig.keyinfo.KeyInfoFactoryKeyValue from the specified public key.newKeyValue in class KeyInfoFactorykey - the public keyKeyValueKeyException - if the key's algorithm is not recognized or supported
by this KeyInfoFactoryKeyInfoFactory.newKeyValue(java.security.PublicKey)public PGPData newPGPData(byte[] keyId)
javax.xml.crypto.dsig.keyinfo.KeyInfoFactoryPGPData from the specified PGP public key
identifier.newPGPData in class KeyInfoFactorykeyId - a PGP public key identifier as defined in RFC 2440 , section
11.2. The array is cloned to protect against subsequent
modification.PGPDataKeyInfoFactory.newPGPData(byte[])public PGPData newPGPData(byte[] keyId, byte[] keyPacket, List other)
javax.xml.crypto.dsig.keyinfo.KeyInfoFactoryPGPData from the specified PGP public key
identifier, and optional key material packet and list of external elements.newPGPData in class KeyInfoFactorykeyId - a PGP public key identifier as defined in RFC 2440 , section
11.2. The array is cloned to protect against subsequent
modification.keyPacket - a PGP key material packet as defined in RFC 2440 , section
5.5. The array is cloned to protect against subsequent modification.
May be null.other - a list of XMLStructures representing
elements from an external namespace. The list is defensively copied
to protect against subsequent modification. May be null
or empty.PGPDataKeyInfoFactory.newPGPData(byte[],
byte[], java.util.List)public PGPData newPGPData(byte[] keyPacket, List other)
javax.xml.crypto.dsig.keyinfo.KeyInfoFactoryPGPData from the specified PGP key material packet
and optional list of external elements.newPGPData in class KeyInfoFactorykeyPacket - a PGP key material packet as defined in RFC 2440 , section
5.5. The array is cloned to protect against subsequent modification.other - a list of XMLStructures representing
elements from an external namespace. The list is defensively copied
to protect against subsequent modification. May be null
or empty.PGPDataKeyInfoFactory.newPGPData(byte[],
java.util.List)public RetrievalMethod newRetrievalMethod(String uri)
javax.xml.crypto.dsig.keyinfo.KeyInfoFactoryRetrievalMethod from the specified URI.newRetrievalMethod in class KeyInfoFactoryuri - the URI that identifies the KeyInfo information to be
retrievedRetrievalMethodKeyInfoFactory.newRetrievalMethod(java.lang.String)public RetrievalMethod newRetrievalMethod(String uri, String type, List transforms)
javax.xml.crypto.dsig.keyinfo.KeyInfoFactoryRetrievalMethod from the specified parameters.newRetrievalMethod in class KeyInfoFactoryuri - the URI that identifies the KeyInfo information to be
retrievedtype - a URI that identifies the type of KeyInfo information
to be retrieved (may be null)transforms - a list of Transforms. The list is
defensively copied to protect against subsequent modification. May
be null or empty.RetrievalMethodKeyInfoFactory.newRetrievalMethod(java.lang.String,
java.lang.String, java.util.List)public X509Data newX509Data(List content)
javax.xml.crypto.dsig.keyinfo.KeyInfoFactoryX509Data containing the specified list of X.509
content.newX509Data in class KeyInfoFactorycontent - a list of one or more X.509 content types. Valid types are
String(subject names), byte[] (subject key
ids), X509CRL, or
X509IssuerSerialobjects or elements from an external
namespace). Subject names are distinguished names in RFC 2253 String
format. Implementations MUST support the attribute type keywords
defined in RFC 2253 (CN, L, ST, O, OU, C, STREET, DC and UID).
Implementations MAY support additional keywords. The list is
defensively copied to protect against subsequent modification.X509DataKeyInfoFactory.newX509Data(java.util.List)public X509IssuerSerial newX509IssuerSerial(String issuerName, BigInteger serialNumber)
javax.xml.crypto.dsig.keyinfo.KeyInfoFactoryX509IssuerSerial from the specified X.500 issuer
distinguished name and serial number.newX509IssuerSerial in class KeyInfoFactoryissuerName - the issuer's distinguished name in RFC 2253 String format.
Implementations MUST support the attribute type keywords defined in
RFC 2253 (CN, L, ST, O, OU, C, STREET, DC and UID). Implementations
MAY support additional keywords.serialNumber - the serial numberX509IssuerSerialKeyInfoFactory.newX509IssuerSerial(java.lang.String,
java.math.BigInteger)public boolean isFeatureSupported(String arg0)
javax.xml.crypto.dsig.keyinfo.KeyInfoFactoryisFeatureSupported in class KeyInfoFactoryarg0 - the feature name (as an absolute URI)true if the specified feature is supported,
false otherwiseKeyInfoFactory.isFeatureSupported(java.lang.String)public URIDereferencer getURIDereferencer()
javax.xml.crypto.dsig.keyinfo.KeyInfoFactoryURIDereferencer that is used by
default to dereference URIs in RetrievalMethod objects.getURIDereferencer in class KeyInfoFactoryURIDereferencerKeyInfoFactory.getURIDereferencer()public KeyInfo unmarshalKeyInfo(XMLStructure xmlStructure) throws MarshalException
javax.xml.crypto.dsig.keyinfo.KeyInfoFactoryKeyInfo instance from a mechanism-specific
XMLStructure (ex: DOMStructure)
instance.unmarshalKeyInfo in class KeyInfoFactoryxmlStructure - a mechanism-specific XML structure from which to unmarshal the
keyinfo fromKeyInfoMarshalException - if an unrecoverable exception occurs during unmarshallingKeyInfoFactory.unmarshalKeyInfo(javax.xml.crypto.XMLStructure)© 2002-2005 IAIK, © 2004, 2006 - 2019 Stiftung SIC