|
XML Security, 1.6 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjavax.xml.crypto.enc.XMLEncryptionFactory
com.ibm.xml.enc.dom.DOMXMLEncryptionFactory
public final class DOMXMLEncryptionFactory
DOM-based implementation of XMLEncryptionFactory
| Constructor Summary | |
|---|---|
DOMXMLEncryptionFactory()
Initializes a new instance of this class. |
|
| Method Summary | |
|---|---|
boolean |
isFeatureSupported(java.lang.String feature)
Indicates whether a specified feature is supported. |
AgreementMethod |
newAgreementMethod(java.lang.String algorithm,
byte[] kaNonce,
KeyInfo originatorKeyInfo,
KeyInfo recipientKeyInfo,
AgreementMethodParameterSpec spec)
This version of the RI does not support Key Agreement |
CanonicalizationMethod |
newCanonicalizationMethod(java.lang.String algorithm,
C14NMethodParameterSpec params)
Returns an instance of the specified CanonicalizationMethod |
CipherReference |
newCipherReference(java.lang.String uri,
java.util.List transforms)
Returns an instance of CipherReference |
DataReference |
newDataReference(java.lang.String uri,
java.util.List content)
Returns an instance of DataReference |
DHKeyValue |
newDHKeyValue(java.security.PublicKey publicKey)
Creates a DHKeyValue from the specified key |
EncryptedData |
newEncryptedData(ToBeEncrypted toBeEncrypted,
EncryptionMethod encMethod,
KeyInfo keyInfo,
EncryptionProperties properties,
java.lang.String id)
Returns an instance of EncryptedData |
EncryptedData |
newEncryptedData(ToBeEncrypted toBeEncrypted,
EncryptionMethod encMethod,
KeyInfo keyInfo,
EncryptionProperties properties,
java.lang.String id,
CipherReference cipherRef)
Returns an instance of EncryptedData with CipherReference |
EncryptedKey |
newEncryptedKey(ToBeEncryptedKey key,
EncryptionMethod encMethod,
KeyInfo keyInfo,
EncryptionProperties properties,
java.util.List references,
java.lang.String carriedKeyName,
java.lang.String recipient,
java.lang.String id)
Returns an instance of EncryptedKey |
EncryptedKey |
newEncryptedKey(ToBeEncryptedKey key,
EncryptionMethod encMethod,
KeyInfo keyInfo,
EncryptionProperties properties,
java.util.List references,
java.lang.String carriedKeyName,
java.lang.String recipient,
java.lang.String id,
CipherReference cipherRef)
Returns an instance of EncryptedKey with CipherReference |
EncryptionMethod |
newEncryptionMethod(java.lang.String algorithm,
java.lang.Integer keySize,
EncryptionMethodParameterSpec params)
Returns an instance of EncryptionMethod |
EncryptionProperties |
newEncryptionProperties(java.util.List properties,
java.lang.String id)
Returns an instance of EncryptionProperties |
EncryptionProperty |
newEncryptionProperty(java.util.List content,
java.lang.String target,
java.lang.String id,
java.util.Map attributes)
Returns an instance of EncryptionProperty |
KeyReference |
newKeyReference(java.lang.String uri,
java.util.List content)
Returns an instance of KeyReference |
KeyInfo |
newOriginatorKeyInfo(java.util.List content,
java.lang.String id)
Creates an originator KeyInfo containing the specified list of key information. |
KeyInfo |
newRecipientKeyInfo(java.util.List content,
java.lang.String id)
Creates a recipient KeyInfo containing the specified list of key information. |
EncryptedType |
unmarshalEncryptedType(XMLDecryptContext context)
Unmarshals the EncryptedType |
| Methods inherited from class javax.xml.crypto.enc.XMLEncryptionFactory |
|---|
getInstance, getInstance, getInstance, getInstance, getMechanismType, getProvider |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public DOMXMLEncryptionFactory()
| Method Detail |
|---|
public boolean isFeatureSupported(java.lang.String feature)
XMLEncryptionFactory
isFeatureSupported in class XMLEncryptionFactoryfeature - the feature name (as an absolute URI)
true if the specified feature is supported,
false otherwise
public AgreementMethod newAgreementMethod(java.lang.String algorithm,
byte[] kaNonce,
KeyInfo originatorKeyInfo,
KeyInfo recipientKeyInfo,
AgreementMethodParameterSpec spec)
throws java.security.NoSuchAlgorithmException,
java.security.InvalidAlgorithmParameterException
newAgreementMethod in class XMLEncryptionFactoryalgorithm - the URI identifying the key agreement algorithmkaNonce - the KA-Nonce (may be null). The value of
kaNonce is cloned to protect against subsequent modificationoriginatorKeyInfo - the originator's key info (may be
null)recipientKeyInfo - the recipient's key info (may be
null)spec - algorithm-specific agreement method parameters
(may be null)
AgreementMethod
java.security.NoSuchAlgorithmException - if an implementation of the
specified algorithm cannot be found
java.security.InvalidAlgorithmParameterException - if the specified parameters
are inappropriate for the requested algorithm
public CanonicalizationMethod newCanonicalizationMethod(java.lang.String algorithm,
C14NMethodParameterSpec params)
throws java.security.NoSuchAlgorithmException,
java.security.InvalidAlgorithmParameterException
newCanonicalizationMethod in class XMLEncryptionFactoryalgorithm - the URI identifying the canonicalization algorithmparams - algorithm-specific canonicalization parameters (may be
null)
CanonicalizationMethod
java.security.NoSuchAlgorithmException - if an implementation of the
specified algorithm cannot be found
java.security.InvalidAlgorithmParameterException - if the specified parameters
are inappropriate for the requested algorithm
public CipherReference newCipherReference(java.lang.String uri,
java.util.List transforms)
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.
CipherReference
public DataReference newDataReference(java.lang.String uri,
java.util.List content)
newDataReference in class XMLEncryptionFactoryuri - the uri that refers to an EncryptedData elementcontent - a list of XMLStructures (may be null or empty). The
list is defensively copied to protect against subsequent modification.
DataReference
public EncryptedData newEncryptedData(ToBeEncrypted toBeEncrypted,
EncryptionMethod encMethod,
KeyInfo keyInfo,
EncryptionProperties properties,
java.lang.String id)
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)
EncryptedData
public EncryptedData newEncryptedData(ToBeEncrypted toBeEncrypted,
EncryptionMethod encMethod,
KeyInfo keyInfo,
EncryptionProperties properties,
java.lang.String id,
CipherReference cipherRef)
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
EncryptedData
public EncryptedKey newEncryptedKey(ToBeEncryptedKey key,
EncryptionMethod encMethod,
KeyInfo keyInfo,
EncryptionProperties properties,
java.util.List references,
java.lang.String carriedKeyName,
java.lang.String recipient,
java.lang.String id)
newEncryptedKey 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)carriedKeyName - the ID of the EncryptedKeyElement (may be null)recipient - the carried key name (may be null)id - the recipient (may be null)
EncryptedKey
public EncryptedKey newEncryptedKey(ToBeEncryptedKey key,
EncryptionMethod encMethod,
KeyInfo keyInfo,
EncryptionProperties properties,
java.util.List references,
java.lang.String carriedKeyName,
java.lang.String recipient,
java.lang.String id,
CipherReference cipherRef)
newEncryptedKey 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)carriedKeyName - the ID of the EncryptedKey element (may be null)recipient - the carried key name (may be null)id - the recipient (may be null)cipherRef - the CiphereReference this EncryptedData will contain
EncryptedKey
public EncryptionMethod newEncryptionMethod(java.lang.String algorithm,
java.lang.Integer keySize,
EncryptionMethodParameterSpec params)
throws java.security.NoSuchAlgorithmException,
java.security.InvalidAlgorithmParameterException
newEncryptionMethod in class XMLEncryptionFactoryalgorithm - the URI identifying the encryption algorithm. Supported
algorithms are defined in EncryptionMethod interface.keySize - the size of the key to be used (or null if
not applicable)params - algorithm-specific encryption parameters (may be
null)
EncryptionMethod
java.security.NoSuchAlgorithmException - if an implementation of the
specified algorithm cannot be found
java.security.InvalidAlgorithmParameterException - if the specified parameters
are inappropriate for the requested algorithm
public EncryptionProperties newEncryptionProperties(java.util.List properties,
java.lang.String 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)
EncryptionProperties
public EncryptionProperty newEncryptionProperty(java.util.List content,
java.lang.String target,
java.lang.String id,
java.util.Map attributes)
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). The map is defensively copied to
protect against subsequent modification.
EncryptionProperty
public KeyReference newKeyReference(java.lang.String uri,
java.util.List content)
newKeyReference in class XMLEncryptionFactoryuri - the uri that refers to an EncryptedKey elementcontent - a list of XMLStructures (may be null or empty). The
list is defensively copied to protect against subsequent modification.
KeyReference
public EncryptedType unmarshalEncryptedType(XMLDecryptContext context)
throws MarshalException
unmarshalEncryptedType in class XMLEncryptionFactorycontext - the mechanism-specific decryption context
EncryptedType
MarshalException - if an unrecoverable exception occurs
during unmarshalling
public KeyInfo newOriginatorKeyInfo(java.util.List content,
java.lang.String id)
throws java.lang.IllegalArgumentException
XMLEncryptionFactory
newOriginatorKeyInfo in class XMLEncryptionFactorycontent - 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)
java.lang.IllegalArgumentException - if content is empty
public KeyInfo newRecipientKeyInfo(java.util.List content,
java.lang.String id)
throws java.lang.IllegalArgumentException
XMLEncryptionFactory
newRecipientKeyInfo in class XMLEncryptionFactorycontent - a list of one or more XMLStructures representing key
information types. The list is defensively copied to protect against
subsequent modification.
java.lang.IllegalArgumentException - if content is empty
public DHKeyValue newDHKeyValue(java.security.PublicKey publicKey)
throws java.security.KeyException
XMLEncryptionFactory
newDHKeyValue in class XMLEncryptionFactorypublicKey - the public key for DH algorithm
java.security.KeyException - if the key can not be used to create
the DHKeyValue
|
XML Security, 1.6 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||