Class XMLCipher
XMLCipher
encrypts and decrypts the contents of
Document
s, Element
s and Element
contents. It was designed to resemble javax.crypto.Cipher
in
order to facilitate understanding of its functioning.-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final String
AES 128 Cipherstatic final String
AES 128 GCM Cipherstatic final String
AES 128 Cipher KeyWrapstatic final String
AES 192 Cipherstatic final String
AES 192 GCM Cipherstatic final String
AES 192 Cipher KeyWrapstatic final String
AES 256 Cipherstatic final String
AES 256 GCM Cipherstatic final String
AES 256 Cipher KeyWrapstatic final String
Base64 encodingstatic final String
CAMELLIA 128 Cipherstatic final String
CAMELLIA 128 Cipher KeyWrapstatic final String
CAMELLIA 192 Cipherstatic final String
CAMELLIA 192 Cipher KeyWrapstatic final String
CAMELLIA 256 Cipherstatic final String
CAMELLIA 256 Cipher KeyWrapstatic final int
DECRYPT Modestatic final String
DIFFIE_HELLMAN Cipherstatic final int
ENCRYPT Modestatic final String
N14C_XML exclusivestatic final String
N14C_XML exclusive with commentsstatic final String
N14C_XMLstatic final String
N14C_XML with commentsstatic final String
N14C_PHYSICAL preserve the physical representationstatic final String
RIPEMD Cipherstatic final String
RSA OAEP Cipherstatic final String
RSA OAEP Cipherstatic final String
RSA 1.5 Cipherstatic final String
SEED 128 Cipherstatic final String
SEED 128 Cipher KeyWrapstatic final String
SHA1 Cipherstatic final String
SHA256 Cipherstatic final String
SHA512 Cipherstatic final String
Triple DES EDE (192 bit key) in CBC modestatic final String
Triple DES EDE (192 bit key) in CBC mode KEYWRAPstatic final int
UNWRAP Modestatic final int
WRAP Modestatic final String
XML Signature NS -
Method Summary
Modifier and TypeMethodDescriptioncreateAgreementMethod
(String algorithm) Create an AgreementMethod objectcreateCipherData
(int type) Create a CipherData objectCreate a CipherReference objectcreateCipherValue
(String value) Create a CipherValue elementcreateEncryptedData
(int type, String value) Creates anEncryptedData
Element
.createEncryptedKey
(int type, String value) Creates anEncryptedKey
Element
.createEncryptionMethod
(String algorithm) Create an EncryptionMethod objectCreate an EncryptionProperties elementCreate a new EncryptionProperty elementcreateReferenceList
(int type) Create a new ReferenceList objectCreate a new Transforms objectcreateTransforms
(Document doc) Create a new Transforms object Because the handling of Transforms is currently done in the signature code, the creation of a Transforms object requires a context document.decryptKey
(EncryptedKey encryptedKey) Decrypt a key from a passed in EncryptedKey structure.decryptKey
(EncryptedKey encryptedKey, String algorithm) Decrypt a key from a passed in EncryptedKey structurebyte[]
decryptToByteArray
(Element element) Decrypt an EncryptedData element to a byte array.Process a DOMDocument
node.Process a DOMElement
node.Process the contents of a DOMElement
node.encryptData
(Document context, String type, InputStream serializedData) Returns anEncryptedData
interface.encryptData
(Document context, Element element) Returns anEncryptedData
interface.encryptData
(Document context, Element element, boolean contentMode) Returns anEncryptedData
interface.encryptKey
(Document doc, Key key) Encrypts a key to an EncryptedKey structureencryptKey
(Document doc, Key key, String mgfAlgorithm, byte[] oaepParams) Encrypts a key to an EncryptedKey structureencryptKey
(Document doc, Key key, String mgfAlgorithm, byte[] oaepParams, SecureRandom random) Encrypts a key to an EncryptedKey structureGet the EncryptedData being builtGet the EncryptedData being build Returns the EncryptedData being built during an ENCRYPT operation.static XMLCipher
Returns anXMLCipher
that implements no specific transformation, and can therefore only be used for decrypt or unwrap operations where the encryption method is defined in theEncryptionMethod
element.static XMLCipher
getInstance
(String transformation) Returns anXMLCipher
that implements the specified transformation and operates on the specified context document.static XMLCipher
getInstance
(String transformation, String canon) Returns anXMLCipher
that implements the specified transformation, operates on the specified context document and serializes the document with the specified canonicalization algorithm before it encrypts the document.static XMLCipher
getInstance
(String transformation, String canon, String digestMethod) Returns anXMLCipher
that implements the specified transformation, operates on the specified context document and serializes the document with the specified canonicalization algorithm before it encrypts the document.static XMLCipher
getProviderInstance
(String provider) Returns anXMLCipher
that implements no specific transformation, and can therefore only be used for decrypt or unwrap operations where the encryption method is defined in theEncryptionMethod
element.static XMLCipher
getProviderInstance
(String transformation, String provider) Returns anXMLCipher
that implements the specified transformation and operates on the specified context document.static XMLCipher
getProviderInstance
(String transformation, String provider, String canon) Returns anXMLCipher
that implements the specified transformation, operates on the specified context document and serializes the document with the specified canonicalization algorithm before it encrypts the document.static XMLCipher
getProviderInstance
(String transformation, String provider, String canon, String digestMethod) Returns anXMLCipher
that implements the specified transformation, operates on the specified context document and serializes the document with the specified canonicalization algorithm before it encrypts the document.Get the Serializer algorithm to usevoid
Initializes this cipher with a key.loadEncryptedData
(Document context, Element element) Returns anEncryptedData
interface.loadEncryptedKey
(Document context, Element element) Returns anEncryptedKey
interface.loadEncryptedKey
(Element element) Returns anEncryptedKey
interface.martial
(EncryptedData encryptedData) Martial an EncryptedData Takes an EncryptedData object and returns a DOM Element that represents the appropriateEncryptedData
martial
(EncryptedKey encryptedKey) Martial an EncryptedKey Takes an EncryptedKey object and returns a DOM Element that represents the appropriateEncryptedKey
martial
(ReferenceList referenceList) Martial a ReferenceList Takes a ReferenceList object and returns a DOM Element that represents the appropriateReferenceList
martial
(Document context, EncryptedData encryptedData) Martial an EncryptedData Takes an EncryptedData object and returns a DOM Element that represents the appropriateEncryptedData
martial
(Document context, EncryptedKey encryptedKey) Martial an EncryptedKey Takes an EncryptedKey object and returns a DOM Element that represents the appropriateEncryptedKey
martial
(Document context, ReferenceList referenceList) Martial a ReferenceList Takes a ReferenceList object and returns a DOM Element that represents the appropriateReferenceList
void
registerInternalKeyResolver
(KeyResolverSpi keyResolver) This method is used to add a customKeyResolverSpi
to an XMLCipher.void
Set a Key Encryption Key.void
setSecureValidation
(boolean secureValidation) Set whether secure validation is enabled or not.void
setSerializer
(Serializer serializer) Set the Serializer algorithm to use
-
Field Details
-
TRIPLEDES
Triple DES EDE (192 bit key) in CBC mode- See Also:
-
AES_128
AES 128 Cipher- See Also:
-
AES_256
AES 256 Cipher- See Also:
-
AES_192
AES 192 Cipher- See Also:
-
AES_128_GCM
AES 128 GCM Cipher- See Also:
-
AES_192_GCM
AES 192 GCM Cipher- See Also:
-
AES_256_GCM
AES 256 GCM Cipher- See Also:
-
SEED_128
SEED 128 Cipher- See Also:
-
CAMELLIA_128
CAMELLIA 128 Cipher- See Also:
-
CAMELLIA_192
CAMELLIA 192 Cipher- See Also:
-
CAMELLIA_256
CAMELLIA 256 Cipher- See Also:
-
RSA_v1dot5
RSA 1.5 Cipher- See Also:
-
RSA_OAEP
RSA OAEP Cipher- See Also:
-
RSA_OAEP_11
RSA OAEP Cipher- See Also:
-
DIFFIE_HELLMAN
DIFFIE_HELLMAN Cipher- See Also:
-
TRIPLEDES_KeyWrap
Triple DES EDE (192 bit key) in CBC mode KEYWRAP- See Also:
-
AES_128_KeyWrap
AES 128 Cipher KeyWrap- See Also:
-
AES_256_KeyWrap
AES 256 Cipher KeyWrap- See Also:
-
AES_192_KeyWrap
AES 192 Cipher KeyWrap- See Also:
-
CAMELLIA_128_KeyWrap
CAMELLIA 128 Cipher KeyWrap- See Also:
-
CAMELLIA_192_KeyWrap
CAMELLIA 192 Cipher KeyWrap- See Also:
-
CAMELLIA_256_KeyWrap
CAMELLIA 256 Cipher KeyWrap- See Also:
-
SEED_128_KeyWrap
SEED 128 Cipher KeyWrap- See Also:
-
SHA1
SHA1 Cipher- See Also:
-
SHA256
SHA256 Cipher- See Also:
-
SHA512
SHA512 Cipher- See Also:
-
RIPEMD_160
RIPEMD Cipher- See Also:
-
XML_DSIG
XML Signature NS- See Also:
-
N14C_XML
N14C_XML- See Also:
-
N14C_XML_WITH_COMMENTS
N14C_XML with comments- See Also:
-
EXCL_XML_N14C
N14C_XML exclusive- See Also:
-
EXCL_XML_N14C_WITH_COMMENTS
N14C_XML exclusive with comments- See Also:
-
PHYSICAL_XML_N14C
N14C_PHYSICAL preserve the physical representation- See Also:
-
BASE64_ENCODING
Base64 encoding- See Also:
-
ENCRYPT_MODE
public static final int ENCRYPT_MODEENCRYPT Mode- See Also:
-
DECRYPT_MODE
public static final int DECRYPT_MODEDECRYPT Mode- See Also:
-
UNWRAP_MODE
public static final int UNWRAP_MODEUNWRAP Mode- See Also:
-
WRAP_MODE
public static final int WRAP_MODEWRAP Mode- See Also:
-
-
Method Details
-
setSerializer
Set the Serializer algorithm to use -
getSerializer
Get the Serializer algorithm to use -
getInstance
Returns anXMLCipher
that implements the specified transformation and operates on the specified context document.If the default provider package supplies an implementation of the requested transformation, an instance of Cipher containing that implementation is returned. If the transformation is not available in the default provider package, other provider packages are searched.
NOTE1: The transformation name does not follow the same pattern as that outlined in the Java Cryptography Extension Reference Guide but rather that specified by the XML Encryption Syntax and Processing document. The rational behind this is to make it easier for a novice at writing Java Encryption software to use the library.
NOTE2:
getInstance()
does not follow the same pattern regarding exceptional conditions as that used injavax.crypto.Cipher
. Instead, it only throws anXMLEncryptionException
which wraps an underlying exception. The stack trace from the exception should be self explanatory.- Parameters:
transformation
- the name of the transformation, e.g.,XMLCipher.TRIPLEDES
which is shorthand for "http://www.w3.org/2001/04/xmlenc#tripledes-cbc"- Returns:
- the XMLCipher
- Throws:
XMLEncryptionException
- See Also:
-
getInstance
public static XMLCipher getInstance(String transformation, String canon) throws XMLEncryptionException Returns anXMLCipher
that implements the specified transformation, operates on the specified context document and serializes the document with the specified canonicalization algorithm before it encrypts the document.- Parameters:
transformation
- the name of the transformationcanon
- the name of the c14n algorithm, ifnull
use standard serializer- Returns:
- the XMLCipher
- Throws:
XMLEncryptionException
-
getInstance
public static XMLCipher getInstance(String transformation, String canon, String digestMethod) throws XMLEncryptionException Returns anXMLCipher
that implements the specified transformation, operates on the specified context document and serializes the document with the specified canonicalization algorithm before it encrypts the document.- Parameters:
transformation
- the name of the transformationcanon
- the name of the c14n algorithm, ifnull
use standard serializerdigestMethod
- An optional digestMethod to use- Returns:
- the XMLCipher
- Throws:
XMLEncryptionException
-
getProviderInstance
public static XMLCipher getProviderInstance(String transformation, String provider) throws XMLEncryptionException Returns anXMLCipher
that implements the specified transformation and operates on the specified context document.- Parameters:
transformation
- the name of the transformationprovider
- the JCE provider that supplies the transformation- Returns:
- the XMLCipher
- Throws:
XMLEncryptionException
-
getProviderInstance
public static XMLCipher getProviderInstance(String transformation, String provider, String canon) throws XMLEncryptionException Returns anXMLCipher
that implements the specified transformation, operates on the specified context document and serializes the document with the specified canonicalization algorithm before it encrypts the document.- Parameters:
transformation
- the name of the transformationprovider
- the JCE provider that supplies the transformationcanon
- the name of the c14n algorithm, ifnull
use standard serializer- Returns:
- the XMLCipher
- Throws:
XMLEncryptionException
-
getProviderInstance
public static XMLCipher getProviderInstance(String transformation, String provider, String canon, String digestMethod) throws XMLEncryptionException Returns anXMLCipher
that implements the specified transformation, operates on the specified context document and serializes the document with the specified canonicalization algorithm before it encrypts the document.- Parameters:
transformation
- the name of the transformationprovider
- the JCE provider that supplies the transformationcanon
- the name of the c14n algorithm, ifnull
use standard serializerdigestMethod
- An optional digestMethod to use- Returns:
- the XMLCipher
- Throws:
XMLEncryptionException
-
getInstance
Returns anXMLCipher
that implements no specific transformation, and can therefore only be used for decrypt or unwrap operations where the encryption method is defined in theEncryptionMethod
element.- Returns:
- The XMLCipher
- Throws:
XMLEncryptionException
-
getProviderInstance
Returns anXMLCipher
that implements no specific transformation, and can therefore only be used for decrypt or unwrap operations where the encryption method is defined in theEncryptionMethod
element. Allows the caller to specify a provider that will be used for cryptographic operations.- Parameters:
provider
- the JCE provider that supplies the transformation- Returns:
- the XMLCipher
- Throws:
XMLEncryptionException
-
init
Initializes this cipher with a key.The cipher is initialized for one of the following four operations: encryption, decryption, key wrapping or key unwrapping, depending on the value of opmode. For WRAP and ENCRYPT modes, this also initialises the internal EncryptedKey or EncryptedData (with a CipherValue) structure that will be used during the ensuing operations. This can be obtained (in order to modify KeyInfo elements etc. prior to finalising the encryption) by calling
getEncryptedData()
orgetEncryptedKey()
.- Parameters:
opmode
- the operation mode of this cipher (this is one of the following: ENCRYPT_MODE, DECRYPT_MODE, WRAP_MODE or UNWRAP_MODE)key
-- Throws:
XMLEncryptionException
- See Also:
-
setSecureValidation
public void setSecureValidation(boolean secureValidation) Set whether secure validation is enabled or not. The default is false. -
registerInternalKeyResolver
This method is used to add a customKeyResolverSpi
to an XMLCipher. These KeyResolvers are used in KeyInfo objects in DECRYPT and UNWRAP modes.- Parameters:
keyResolver
-
-
getEncryptedData
Get the EncryptedData being builtReturns the EncryptedData being built during an ENCRYPT operation. This can then be used by applications to add KeyInfo elements and set other parameters.
- Returns:
- The EncryptedData being built
-
getEncryptedKey
Get the EncryptedData being build Returns the EncryptedData being built during an ENCRYPT operation. This can then be used by applications to add KeyInfo elements and set other parameters.- Returns:
- The EncryptedData being built
-
setKEK
Set a Key Encryption Key.The Key Encryption Key (KEK) is used for encrypting/decrypting EncryptedKey elements. By setting this separately, the XMLCipher class can know whether a key applies to the data part or wrapped key part of an encrypted object.
- Parameters:
kek
- The key to use for de/encrypting key data
-
martial
Martial an EncryptedData Takes an EncryptedData object and returns a DOM Element that represents the appropriateEncryptedData
Note: This should only be used in cases where the context document has been passed in via a call to doFinal.
- Parameters:
encryptedData
- EncryptedData object to martial- Returns:
- the DOM
Element
representing the passed in object
-
martial
Martial an EncryptedData Takes an EncryptedData object and returns a DOM Element that represents the appropriateEncryptedData
- Parameters:
context
- The document that will own the returned nodesencryptedData
- EncryptedData object to martial- Returns:
- the DOM
Element
representing the passed in object
-
martial
Martial an EncryptedKey Takes an EncryptedKey object and returns a DOM Element that represents the appropriateEncryptedKey
Note: This should only be used in cases where the context document has been passed in via a call to doFinal.
- Parameters:
encryptedKey
- EncryptedKey object to martial- Returns:
- the DOM
Element
representing the passed in object
-
martial
Martial an EncryptedKey Takes an EncryptedKey object and returns a DOM Element that represents the appropriateEncryptedKey
- Parameters:
context
- The document that will own the created nodesencryptedKey
- EncryptedKey object to martial- Returns:
- the DOM
Element
representing the passed in object
-
martial
Martial a ReferenceList Takes a ReferenceList object and returns a DOM Element that represents the appropriateReferenceList
Note: This should only be used in cases where the context document has been passed in via a call to doFinal.
- Parameters:
referenceList
- ReferenceList object to martial- Returns:
- the DOM
Element
representing the passed in object
-
martial
Martial a ReferenceList Takes a ReferenceList object and returns a DOM Element that represents the appropriateReferenceList
- Parameters:
context
- The document that will own the created nodesreferenceList
- ReferenceList object to martial- Returns:
- the DOM
Element
representing the passed in object
-
doFinal
Process a DOMDocument
node. The processing depends on the initialization parameters ofinit()
.- Parameters:
context
- the contextDocument
.source
- theDocument
to be encrypted or decrypted.- Returns:
- the processed
Document
. - Throws:
Exception
- to indicate any exceptional conditions.
-
doFinal
Process a DOMElement
node. The processing depends on the initialization parameters ofinit()
.- Parameters:
context
- the contextDocument
.element
- theElement
to be encrypted.- Returns:
- the processed
Document
. - Throws:
Exception
- to indicate any exceptional conditions.
-
doFinal
Process the contents of a DOMElement
node. The processing depends on the initialization parameters ofinit()
.- Parameters:
context
- the contextDocument
.element
- theElement
which contents is to be encrypted.content
-- Returns:
- the processed
Document
. - Throws:
Exception
- to indicate any exceptional conditions.
-
encryptData
Returns anEncryptedData
interface. Use this operation if you want to have full control over the contents of theEncryptedData
structure. This does not change the source document in any way.- Parameters:
context
- the contextDocument
.element
- theElement
that will be encrypted.- Returns:
- the
EncryptedData
- Throws:
Exception
-
encryptData
public EncryptedData encryptData(Document context, String type, InputStream serializedData) throws Exception Returns anEncryptedData
interface. Use this operation if you want to have full control over the serialization of the element or element content. This does not change the source document in any way.- Parameters:
context
- the contextDocument
.type
- a URI identifying type information about the plaintext form of the encrypted content (may benull
)serializedData
- the serialized data- Returns:
- the
EncryptedData
- Throws:
Exception
-
encryptData
public EncryptedData encryptData(Document context, Element element, boolean contentMode) throws Exception Returns anEncryptedData
interface. Use this operation if you want to have full control over the contents of theEncryptedData
structure. This does not change the source document in any way.- Parameters:
context
- the contextDocument
.element
- theElement
that will be encrypted.contentMode
-true
to encrypt element's content only,false
otherwise- Returns:
- the
EncryptedData
- Throws:
Exception
-
loadEncryptedData
public EncryptedData loadEncryptedData(Document context, Element element) throws XMLEncryptionException Returns anEncryptedData
interface. Use this operation if you want to load anEncryptedData
structure from a DOM structure and manipulate the contents.- Parameters:
context
- the contextDocument
.element
- theElement
that will be loaded- Returns:
- the
EncryptedData
- Throws:
XMLEncryptionException
-
loadEncryptedKey
public EncryptedKey loadEncryptedKey(Document context, Element element) throws XMLEncryptionException Returns anEncryptedKey
interface. Use this operation if you want to load anEncryptedKey
structure from a DOM structure and manipulate the contents.- Parameters:
context
- the contextDocument
.element
- theElement
that will be loaded- Returns:
- the
EncryptedKey
- Throws:
XMLEncryptionException
-
loadEncryptedKey
Returns anEncryptedKey
interface. Use this operation if you want to load anEncryptedKey
structure from a DOM structure and manipulate the contents. Assumes that the context document is the document that owns the element- Parameters:
element
- theElement
that will be loaded- Returns:
- the
EncryptedKey
- Throws:
XMLEncryptionException
-
encryptKey
Encrypts a key to an EncryptedKey structure- Parameters:
doc
- the Context document that will be used to general DOMkey
- Key to encrypt (will use previously set KEK to perform encryption- Returns:
- the
EncryptedKey
- Throws:
XMLEncryptionException
-
encryptKey
public EncryptedKey encryptKey(Document doc, Key key, String mgfAlgorithm, byte[] oaepParams) throws XMLEncryptionException Encrypts a key to an EncryptedKey structure- Parameters:
doc
- the Context document that will be used to general DOMkey
- Key to encrypt (will use previously set KEK to perform encryptionmgfAlgorithm
- The xenc11 MGF Algorithm to useoaepParams
- The OAEPParams to use- Returns:
- the
EncryptedKey
- Throws:
XMLEncryptionException
-
encryptKey
public EncryptedKey encryptKey(Document doc, Key key, String mgfAlgorithm, byte[] oaepParams, SecureRandom random) throws XMLEncryptionException Encrypts a key to an EncryptedKey structure- Parameters:
doc
- the Context document that will be used to general DOMkey
- Key to encrypt (will use previously set KEK to perform encryptionmgfAlgorithm
- The xenc11 MGF Algorithm to useoaepParams
- The OAEPParams to userandom
- The SecureRandom instance to use when initializing the Cipher- Returns:
- the
EncryptedKey
- Throws:
XMLEncryptionException
-
decryptKey
Decrypt a key from a passed in EncryptedKey structure- Parameters:
encryptedKey
- Previously loaded EncryptedKey that needs to be decrypted.algorithm
- Algorithm for the decrypted key- Returns:
- a key corresponding to the given type
- Throws:
XMLEncryptionException
-
decryptKey
Decrypt a key from a passed in EncryptedKey structure. This version is used mainly internally, when the cipher already has an EncryptedData loaded. The algorithm URI will be read from the EncryptedData- Parameters:
encryptedKey
- Previously loaded EncryptedKey that needs to be decrypted.- Returns:
- a key corresponding to the given type
- Throws:
XMLEncryptionException
-
decryptToByteArray
Decrypt an EncryptedData element to a byte array. When passed in an EncryptedData node, returns the decryption as a byte array. Does not modify the source document.- Parameters:
element
-- Returns:
- the bytes resulting from the decryption
- Throws:
XMLEncryptionException
-
createEncryptedData
Creates anEncryptedData
Element
. The newEncryptedData and newEncryptedKey methods create fairly complete elements that are immediately useable. All the other create* methods return bare elements that still need to be built upon.An EncryptionMethod will still need to be added however
- Parameters:
type
- Either REFERENCE_TYPE or VALUE_TYPE - defines what kind of CipherData this EncryptedData will contain.value
- the Base 64 encoded, encrypted text to wrap in theEncryptedData
or the URI to set in the CipherReference (usage will depend on thetype
- Returns:
- the
EncryptedData
Element
. - Throws:
XMLEncryptionException
-
createEncryptedKey
Creates anEncryptedKey
Element
. The newEncryptedData and newEncryptedKey methods create fairly complete elements that are immediately useable. All the other create* methods return bare elements that still need to be built upon.An EncryptionMethod will still need to be added however
- Parameters:
type
- Either REFERENCE_TYPE or VALUE_TYPE - defines what kind of CipherData this EncryptedData will contain.value
- the Base 64 encoded, encrypted text to wrap in theEncryptedKey
or the URI to set in the CipherReference (usage will depend on thetype
- Returns:
- the
EncryptedKey
Element
. - Throws:
XMLEncryptionException
-
createAgreementMethod
Create an AgreementMethod object- Parameters:
algorithm
- Algorithm of the agreement method- Returns:
- a new
AgreementMethod
-
createCipherData
Create a CipherData object- Parameters:
type
- Type of this CipherData (either VALUE_TUPE or REFERENCE_TYPE)- Returns:
- a new
CipherData
-
createCipherReference
Create a CipherReference object- Parameters:
uri
- The URI that the reference will refer- Returns:
- a new
CipherReference
-
createCipherValue
Create a CipherValue element- Parameters:
value
- The value to set the ciphertext to- Returns:
- a new
CipherValue
-
createEncryptionMethod
Create an EncryptionMethod object- Parameters:
algorithm
- Algorithm for the encryption- Returns:
- a new
EncryptionMethod
-
createEncryptionProperties
Create an EncryptionProperties element- Returns:
- a new
EncryptionProperties
-
createEncryptionProperty
Create a new EncryptionProperty element- Returns:
- a new
EncryptionProperty
-
createReferenceList
Create a new ReferenceList object- Parameters:
type
- ReferenceList.DATA_REFERENCE or ReferenceList.KEY_REFERENCE- Returns:
- a new
ReferenceList
-
createTransforms
Create a new Transforms objectNote: A context document must have been set elsewhere (possibly via a call to doFinal). If not, use the createTransforms(Document) method.
- Returns:
- a new
Transforms
-
createTransforms
Create a new Transforms object Because the handling of Transforms is currently done in the signature code, the creation of a Transforms object requires a context document.- Parameters:
doc
- Document that will own the created Transforms node- Returns:
- a new
Transforms
-