public class XMLEncryptionFactory extends XMLEncryptionFactory
XMLEncryptionFactory
that supports the DOM XML representation and processing mechanism.| Constructor and Description |
|---|
XMLEncryptionFactory() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
isFeatureSupported(String feature)
Indicates whether a specified feature is supported.
|
AgreementMethod |
newAgreementMethod(String algorithm,
byte[] kaNonce,
XMLStructure originatorKeyInfo,
XMLStructure recipientKeyInfo,
AgreementMethodParameterSpec params)
Creates an
AgreementMethod. |
CanonicalizationMethod |
newCanonicalizationMethod(String algorithm,
C14NMethodParameterSpec params)
Creates a
CanonicalizationMethod for the specified algorithm
URI and parameters. |
CipherReference |
newCipherReference(String uri,
List transforms)
Creates a
CipherReference from the specified parameters. |
DataReference |
newDataReference(String uri,
List content)
Creates a
DataReference from the specified URI. |
EncryptedData |
newEncryptedData(ToBeEncrypted toBeEncrypted,
EncryptionMethod encMethod,
KeyInfo keyInfo,
EncryptionProperties properties,
String id)
Creates an
EncryptedData which contains a
CipherValue. |
EncryptedData |
newEncryptedData(ToBeEncrypted toBeEncrypted,
EncryptionMethod encMethod,
KeyInfo keyInfo,
EncryptionProperties properties,
String id,
CipherReference cipherRef)
Creates an
EncryptedData which contains a
CiphereReference. |
EncryptedKey |
newEncryptedKey(ToBeEncryptedKey key,
EncryptionMethod encMethod,
KeyInfo keyInfo,
EncryptionProperties properties,
List references,
String id,
String carriedKeyName,
String recipient)
Creates an EncryptedKey which contains a CipherValue.
|
EncryptedKey |
newEncryptedKey(ToBeEncryptedKey key,
EncryptionMethod encMethod,
KeyInfo keyInfo,
EncryptionProperties properties,
List references,
String id,
String carriedKeyName,
String recipient,
CipherReference cipherRef)
Creates an EncryptedKey which contains a CipherReference.
|
EncryptionMethod |
newEncryptionMethod(String algorithm,
Integer keySize,
EncryptionMethodParameterSpec params)
Creates a EncryptionMethod for the specified algorithm URI, key size, and
parameters.
|
EncryptionProperties |
newEncryptionProperties(List properties,
String id)
Creates
EncryptionPropertiescontaining the specified list of
EncryptionPropertys and optional id. |
EncryptionProperty |
newEncryptionProperty(List content,
String target,
String id,
Map attributes)
Creates an
EncryptionProperty containing the specified list of
XMLStructure s,
target URI and optional id. |
KeyReference |
newKeyReference(String uri,
List content)
Creates a
KeyReference from the specified URI. |
EncryptedType |
unmarshalEncryptedType(XMLDecryptContext context)
Unmarshals a new
EncryptedType instance from a
mechanism-specific XMLDecryptContext instance. |
getInstance, getInstance, getInstance, getInstance, getMechanismType, getProviderpublic EncryptedData newEncryptedData(ToBeEncrypted toBeEncrypted, EncryptionMethod encMethod, KeyInfo keyInfo, EncryptionProperties properties, String id) throws IllegalArgumentException
javax.xml.crypto.enc.XMLEncryptionFactoryEncryptedData which contains a
CipherValue.newEncryptedData in class XMLEncryptionFactorytoBeEncrypted - the data to be encrypted in this EncryptedDataencMethod - the encryption method (may be null)keyInfo - the key info (may be null)properties - the encryption properties (may be null)id - the ID (may be null)EncryptedDataIllegalArgumentException - if ToBeEncryptedKey is passed in as toBeEncryptedXMLEncryptionFactory.newEncryptedData(javax.xml.crypto.enc.ToBeEncrypted,
javax.xml.crypto.enc.EncryptionMethod,
javax.xml.crypto.dsig.keyinfo.KeyInfo,
javax.xml.crypto.enc.EncryptionProperties, java.lang.String)public EncryptedData newEncryptedData(ToBeEncrypted toBeEncrypted, EncryptionMethod encMethod, KeyInfo keyInfo, EncryptionProperties properties, String id, CipherReference cipherRef) throws IllegalArgumentException
javax.xml.crypto.enc.XMLEncryptionFactoryEncryptedData which contains a
CiphereReference.newEncryptedData in class XMLEncryptionFactorytoBeEncrypted - the data to be encrypted in this EncryptedDataencMethod - the encryption method (may be null)keyInfo - the key info (may be null)properties - the encryption properties (may be null)id - the ID (may be null)cipherRef - the CiphereReference this EncryptedData will contain.EncryptedDataIllegalArgumentException - if ToBeEncryptedKey is passed in as toBeEncryptedXMLEncryptionFactory.newEncryptedData(javax.xml.crypto.enc.ToBeEncrypted,
javax.xml.crypto.enc.EncryptionMethod,
javax.xml.crypto.dsig.keyinfo.KeyInfo,
javax.xml.crypto.enc.EncryptionProperties, java.lang.String,
javax.xml.crypto.enc.CipherReference)public EncryptedKey newEncryptedKey(ToBeEncryptedKey key, EncryptionMethod encMethod, KeyInfo keyInfo, EncryptionProperties properties, List references, String id, String carriedKeyName, String recipient)
javax.xml.crypto.enc.XMLEncryptionFactorynewEncryptedKey in class XMLEncryptionFactorykey - the key to be encryptedencMethod - the encryption method (may be null)keyInfo - the key info (may be null)properties - the encryption properties (may be null)references - a list of DataReferences or KeyReferences (may be null
or empty)id - the Id (may be null)carriedKeyName - the carried key name (may be null)recipient - the recipient (may be null)XMLEncryptionFactory.newEncryptedKey(javax.xml.crypto.enc.ToBeEncryptedKey,
javax.xml.crypto.enc.EncryptionMethod,
javax.xml.crypto.dsig.keyinfo.KeyInfo,
javax.xml.crypto.enc.EncryptionProperties, java.util.List,
java.lang.String, java.lang.String, java.lang.String)public EncryptedKey newEncryptedKey(ToBeEncryptedKey key, EncryptionMethod encMethod, KeyInfo keyInfo, EncryptionProperties properties, List references, String id, String carriedKeyName, String recipient, CipherReference cipherRef)
javax.xml.crypto.enc.XMLEncryptionFactorynewEncryptedKey in class XMLEncryptionFactorykey - the key to be encryptedencMethod - the encryption method (may be null)keyInfo - the key info (may be null)properties - the encryption properties (may be null)references - a list of DataReferences or KeyReferences (may be null
or empty)id - the Id (may be null)carriedKeyName - the carried key name (may be null)recipient - the recipient (may be null)cipherRef - the CiphereReference this EncryptedData will contain.XMLEncryptionFactory.newEncryptedKey(javax.xml.crypto.enc.ToBeEncryptedKey,
javax.xml.crypto.enc.EncryptionMethod,
javax.xml.crypto.dsig.keyinfo.KeyInfo,
javax.xml.crypto.enc.EncryptionProperties, java.util.List,
java.lang.String, java.lang.String, java.lang.String,
javax.xml.crypto.enc.CipherReference)public EncryptionMethod newEncryptionMethod(String algorithm, Integer keySize, EncryptionMethodParameterSpec params) throws NoSuchAlgorithmException, InvalidAlgorithmParameterException
javax.xml.crypto.enc.XMLEncryptionFactorynewEncryptionMethod in class XMLEncryptionFactoryalgorithm - the URI identifying the digest algorithmkeySize - the size of the key to be used (or null if not
applicable)params - algorithm-specific encryption parameters (may be null)NoSuchAlgorithmException - if an implementation of the specified algorithm cannot be foundInvalidAlgorithmParameterException - if the specified parameters are inappropriate for the requested
algorithmXMLEncryptionFactory.newEncryptionMethod(java.lang.String,
java.lang.Integer,
javax.xml.crypto.enc.spec.EncryptionMethodParameterSpec)public AgreementMethod newAgreementMethod(String algorithm, byte[] kaNonce, XMLStructure originatorKeyInfo, XMLStructure recipientKeyInfo, AgreementMethodParameterSpec params) throws NoSuchAlgorithmException, InvalidAlgorithmParameterException
javax.xml.crypto.enc.XMLEncryptionFactoryAgreementMethod.newAgreementMethod in class XMLEncryptionFactoryalgorithm - the URI identifying the key agreement algorithmkaNonce - the KA-Nonce (may be null)originatorKeyInfo - the originator's key info (may be null)recipientKeyInfo - the recipient's key info (may be null)params - algorithm-specific agreement method parameters (may be
null)NoSuchAlgorithmException - if an implementation of the specified algorithm cannot be foundInvalidAlgorithmParameterException - if the specified parameters are inappropriate for the requested
algorithmXMLEncryptionFactory.newAgreementMethod(java.lang.String,
byte[], javax.xml.crypto.XMLStructure, javax.xml.crypto.XMLStructure,
javax.xml.crypto.enc.spec.AgreementMethodParameterSpec)public CanonicalizationMethod newCanonicalizationMethod(String algorithm, C14NMethodParameterSpec params) throws NoSuchAlgorithmException, InvalidAlgorithmParameterException
javax.xml.crypto.enc.XMLEncryptionFactoryCanonicalizationMethod for the specified algorithm
URI and parameters.newCanonicalizationMethod in class XMLEncryptionFactoryalgorithm - the URI identifying the canonicalization algorithmparams - algorithm-specific canonicalization parameters (may be
null)NoSuchAlgorithmException - if an implementation of the specified algorithm cannot be foundInvalidAlgorithmParameterException - if the specified parameters are inappropriate for the requested
algorithmXMLEncryptionFactory.newCanonicalizationMethod(java.lang.String,
javax.xml.crypto.dsig.spec.C14NMethodParameterSpec)public CipherReference newCipherReference(String uri, List transforms)
javax.xml.crypto.enc.XMLEncryptionFactoryCipherReference from the specified parameters.newCipherReference in class XMLEncryptionFactoryuri - the URI that identifies the encrypted octet sequencetransforms - a list of Transforms. The list is defensively copied to protect
against subsequent modification. May be null or empty.XMLEncryptionFactory.newCipherReference(java.lang.String,
java.util.List)public DataReference newDataReference(String uri, List content)
javax.xml.crypto.enc.XMLEncryptionFactoryDataReference from the specified URI.newDataReference in class XMLEncryptionFactoryuri - the uri that refers to an EncryptedData elementcontent - a list of XMLStructure s (may be null). The list is
defensively copied to protect against subsequent modification.DataReferenceXMLEncryptionFactory.newDataReference(java.lang.String,
java.util.List)public KeyReference newKeyReference(String uri, List content)
javax.xml.crypto.enc.XMLEncryptionFactoryKeyReference from the specified URI.newKeyReference in class XMLEncryptionFactoryuri - the uri that refers to an EncryptedKey elementcontent - a list of XMLStructure s (may be null). The list is
defensively copied to protect against subsequent modification.XMLEncryptionFactory.newKeyReference(java.lang.String,
java.util.List)public EncryptionProperties newEncryptionProperties(List properties, String id)
javax.xml.crypto.enc.XMLEncryptionFactoryEncryptionPropertiescontaining the specified list of
EncryptionPropertys and optional id.newEncryptionProperties in class XMLEncryptionFactoryproperties - a list of one or more EncryptionPropertys. The list is defensively
copied to protect against subsequent modification.id - the id (may be null)XMLEncryptionFactory.newEncryptionProperties(java.util.List,
java.lang.String)public EncryptionProperty newEncryptionProperty(List content, String target, String id, Map attributes)
javax.xml.crypto.enc.XMLEncryptionFactoryEncryptionProperty containing the specified list of
XMLStructure s,
target URI and optional id.newEncryptionProperty in class XMLEncryptionFactorycontent - a list of one or more XMLStructures. The list is defensively copied
to protect against subsequent modification.target - the target URI of the EncryptedType that this property applies to
(may be null)id - the id (may be null)attributes - a map of attributes from the XML namespace (may be empty or null)EncryptionPropertyXMLEncryptionFactory.newEncryptionProperty(java.util.List,
java.lang.String, java.lang.String, java.util.Map)public EncryptedType unmarshalEncryptedType(XMLDecryptContext context) throws MarshalException
javax.xml.crypto.enc.XMLEncryptionFactoryEncryptedType instance from a
mechanism-specific XMLDecryptContext instance.unmarshalEncryptedType in class XMLEncryptionFactorycontext - the mechanism-specific decryption contextMarshalException - if an unrecoverable exception occurs during unmarshallingXMLEncryptionFactory.unmarshalEncryptedType(javax.xml.crypto.enc.XMLDecryptContext)public boolean isFeatureSupported(String feature)
javax.xml.crypto.enc.XMLEncryptionFactoryisFeatureSupported in class XMLEncryptionFactoryfeature - the feature name (as an absolute URI)true if the specified feature is supported,
false otherwiseXMLEncryptionFactory.isFeatureSupported(java.lang.String)© 2002-2005 IAIK, © 2004, 2006 - 2019 Stiftung SIC