Methods Summary |
---|
public static javax.xml.crypto.dsig.XMLSignatureFactory | getInstance(java.lang.String mechanismType)Returns an XMLSignatureFactory that supports the
specified XML processing mechanism and representation type (ex: "DOM").
This method uses the standard JCA provider lookup mechanism to
locate and instantiate an XMLSignatureFactory
implementation of the desired mechanism type. It traverses the list of
registered security Provider s, starting with the most
preferred Provider . A new XMLSignatureFactory
object from the first Provider that supports the specified
mechanism is returned.
Note that the list of registered providers may be retrieved via
the {@link Security#getProviders() Security.getProviders()} method.
if (mechanismType == null) {
throw new NullPointerException("mechanismType cannot be null");
}
Instance instance;
try {
instance = GetInstance.getInstance
("XMLSignatureFactory", null, mechanismType);
} catch (NoSuchAlgorithmException nsae) {
throw new NoSuchMechanismException(nsae);
}
XMLSignatureFactory factory = (XMLSignatureFactory) instance.impl;
factory.mechanismType = mechanismType;
factory.provider = instance.provider;
return factory;
|
public static javax.xml.crypto.dsig.XMLSignatureFactory | getInstance(java.lang.String mechanismType, java.security.Provider provider)Returns an XMLSignatureFactory that supports the
requested XML processing mechanism and representation type (ex: "DOM"),
as supplied by the specified provider. Note that the specified
Provider object does not have to be registered in the
provider list.
if (mechanismType == null) {
throw new NullPointerException("mechanismType cannot be null");
} else if (provider == null) {
throw new NullPointerException("provider cannot be null");
}
Instance instance;
try {
instance = GetInstance.getInstance
("XMLSignatureFactory", null, mechanismType, provider);
} catch (NoSuchAlgorithmException nsae) {
throw new NoSuchMechanismException(nsae);
}
XMLSignatureFactory factory = (XMLSignatureFactory) instance.impl;
factory.mechanismType = mechanismType;
factory.provider = instance.provider;
return factory;
|
public static javax.xml.crypto.dsig.XMLSignatureFactory | getInstance(java.lang.String mechanismType, java.lang.String provider)Returns an XMLSignatureFactory that supports the
requested XML processing mechanism and representation type (ex: "DOM"),
as supplied by the specified provider. The specified provider must be
registered in the security provider list.
Note that the list of registered providers may be retrieved via
the {@link Security#getProviders() Security.getProviders()} method.
if (mechanismType == null) {
throw new NullPointerException("mechanismType cannot be null");
} else if (provider == null) {
throw new NullPointerException("provider cannot be null");
} else if (provider.length() == 0) {
throw new NoSuchProviderException();
}
Instance instance;
try {
instance = GetInstance.getInstance
("XMLSignatureFactory", null, mechanismType, provider);
} catch (NoSuchAlgorithmException nsae) {
throw new NoSuchMechanismException(nsae);
}
XMLSignatureFactory factory = (XMLSignatureFactory) instance.impl;
factory.mechanismType = mechanismType;
factory.provider = instance.provider;
return factory;
|
public static javax.xml.crypto.dsig.XMLSignatureFactory | getInstance()Returns an XMLSignatureFactory that supports the
default XML processing mechanism and representation type ("DOM").
This method uses the standard JCA provider lookup mechanism to
locate and instantiate an XMLSignatureFactory
implementation of the default mechanism type. It traverses the list of
registered security Provider s, starting with the most
preferred Provider . A new XMLSignatureFactory
object from the first Provider that supports the DOM
mechanism is returned.
Note that the list of registered providers may be retrieved via
the {@link Security#getProviders() Security.getProviders()} method.
return getInstance("DOM");
|
public final javax.xml.crypto.dsig.keyinfo.KeyInfoFactory | getKeyInfoFactory()Returns a KeyInfoFactory that creates KeyInfo
objects. The returned KeyInfoFactory has the same
mechanism type and provider as this XMLSignatureFactory .
return KeyInfoFactory.getInstance(getMechanismType(), getProvider());
|
public final java.lang.String | getMechanismType()Returns the type of the XML processing mechanism and representation
supported by this XMLSignatureFactory (ex: "DOM").
return mechanismType;
|
public final java.security.Provider | getProvider()Returns the provider of this XMLSignatureFactory .
return provider;
|
public abstract javax.xml.crypto.URIDereferencer | getURIDereferencer()Returns a reference to the URIDereferencer that is used by
default to dereference URIs in {@link Reference} objects.
|
public abstract boolean | isFeatureSupported(java.lang.String feature)Indicates whether a specified feature is supported.
|
public abstract javax.xml.crypto.dsig.CanonicalizationMethod | newCanonicalizationMethod(java.lang.String algorithm, javax.xml.crypto.dsig.spec.C14NMethodParameterSpec params)Creates a CanonicalizationMethod for the specified
algorithm URI and parameters.
|
public abstract javax.xml.crypto.dsig.CanonicalizationMethod | newCanonicalizationMethod(java.lang.String algorithm, javax.xml.crypto.XMLStructure params)Creates a CanonicalizationMethod for the specified
algorithm URI and parameters. The parameters are specified as a
mechanism-specific XMLStructure (ex: {@link DOMStructure}).
This method is useful when the parameters are in XML form or there is
no standard class for specifying the parameters.
|
public abstract javax.xml.crypto.dsig.DigestMethod | newDigestMethod(java.lang.String algorithm, javax.xml.crypto.dsig.spec.DigestMethodParameterSpec params)Creates a DigestMethod for the specified algorithm URI
and parameters.
|
public abstract javax.xml.crypto.dsig.Manifest | newManifest(java.util.List references)Creates a Manifest containing the specified
list of {@link Reference}s.
|
public abstract javax.xml.crypto.dsig.Manifest | newManifest(java.util.List references, java.lang.String id)Creates a Manifest containing the specified
list of {@link Reference}s and optional id.
|
public abstract javax.xml.crypto.dsig.Reference | newReference(java.lang.String uri, javax.xml.crypto.dsig.DigestMethod dm)Creates a Reference with the specified URI and digest
method.
|
public abstract javax.xml.crypto.dsig.Reference | newReference(java.lang.String uri, javax.xml.crypto.dsig.DigestMethod dm, java.util.List transforms, java.lang.String type, java.lang.String id)Creates a Reference with the specified parameters.
|
public abstract javax.xml.crypto.dsig.Reference | newReference(java.lang.String uri, javax.xml.crypto.dsig.DigestMethod dm, java.util.List transforms, java.lang.String type, java.lang.String id, byte[] digestValue)Creates a Reference with the specified parameters and
pre-calculated digest value.
This method is useful when the digest value of a
Reference has been previously computed. See for example,
the
OASIS-DSS (Digital Signature Services) specification.
|
public abstract javax.xml.crypto.dsig.Reference | newReference(java.lang.String uri, javax.xml.crypto.dsig.DigestMethod dm, java.util.List appliedTransforms, javax.xml.crypto.Data result, java.util.List transforms, java.lang.String type, java.lang.String id)Creates a Reference with the specified parameters.
This method is useful when a list of transforms have already been
applied to the Reference . See for example,
the
OASIS-DSS (Digital Signature Services) specification.
When an XMLSignature containing this reference is
generated, the specified transforms (if non-null) are
applied to the specified result . The
Transforms element of the resulting Reference
element is set to the concatenation of the
appliedTransforms and transforms .
|
public abstract javax.xml.crypto.dsig.SignatureMethod | newSignatureMethod(java.lang.String algorithm, javax.xml.crypto.dsig.spec.SignatureMethodParameterSpec params)Creates a SignatureMethod for the specified algorithm URI
and parameters.
|
public abstract javax.xml.crypto.dsig.SignatureProperties | newSignatureProperties(java.util.List properties, java.lang.String id)Creates a SignatureProperties containing the specified
list of {@link SignatureProperty}s and optional id.
|
public abstract javax.xml.crypto.dsig.SignatureProperty | newSignatureProperty(java.util.List content, java.lang.String target, java.lang.String id)Creates a SignatureProperty containing the specified
list of {@link XMLStructure}s, target URI and optional id.
|
public abstract javax.xml.crypto.dsig.SignedInfo | newSignedInfo(javax.xml.crypto.dsig.CanonicalizationMethod cm, javax.xml.crypto.dsig.SignatureMethod sm, java.util.List references)Creates a SignedInfo with the specified canonicalization
and signature methods, and list of one or more references.
|
public abstract javax.xml.crypto.dsig.SignedInfo | newSignedInfo(javax.xml.crypto.dsig.CanonicalizationMethod cm, javax.xml.crypto.dsig.SignatureMethod sm, java.util.List references, java.lang.String id)Creates a SignedInfo with the specified parameters.
|
public abstract javax.xml.crypto.dsig.Transform | newTransform(java.lang.String algorithm, javax.xml.crypto.dsig.spec.TransformParameterSpec params)Creates a Transform for the specified algorithm URI
and parameters.
|
public abstract javax.xml.crypto.dsig.Transform | newTransform(java.lang.String algorithm, javax.xml.crypto.XMLStructure params)Creates a Transform for the specified algorithm URI
and parameters. The parameters are specified as a mechanism-specific
XMLStructure (ex: {@link DOMStructure}). This method is
useful when the parameters are in XML form or there is no standard
class for specifying the parameters.
|
public abstract javax.xml.crypto.dsig.XMLObject | newXMLObject(java.util.List content, java.lang.String id, java.lang.String mimeType, java.lang.String encoding)Creates an XMLObject from the specified parameters.
|
public abstract javax.xml.crypto.dsig.XMLSignature | newXMLSignature(javax.xml.crypto.dsig.SignedInfo si, javax.xml.crypto.dsig.keyinfo.KeyInfo ki)Creates an XMLSignature and initializes it with the contents
of the specified SignedInfo and KeyInfo
objects.
|
public abstract javax.xml.crypto.dsig.XMLSignature | newXMLSignature(javax.xml.crypto.dsig.SignedInfo si, javax.xml.crypto.dsig.keyinfo.KeyInfo ki, java.util.List objects, java.lang.String id, java.lang.String signatureValueId)Creates an XMLSignature and initializes it with the
specified parameters.
|
public abstract javax.xml.crypto.dsig.XMLSignature | unmarshalXMLSignature(javax.xml.crypto.dsig.XMLValidateContext context)Unmarshals a new XMLSignature instance from a
mechanism-specific XMLValidateContext instance.
|
public abstract javax.xml.crypto.dsig.XMLSignature | unmarshalXMLSignature(javax.xml.crypto.XMLStructure xmlStructure)Unmarshals a new XMLSignature instance from a
mechanism-specific XMLStructure instance.
This method is useful if you only want to unmarshal (and not
validate) an XMLSignature .
|