IP*Works! Encrypt V9 - Online Help
IP*Works! Encrypt V9
Questions / Feedback?

XMLEncrypt Bean

Properties   Methods   Events   Configuration Settings   Errors  

The XMLEncrypt component is used to encrypt and decrypt XML.

Syntax

IPWorksEncrypt.Xmlencrypt

Remarks

The XMLEncrypt component provides a simple API for encrypting and decrypting XML. The Encrypt method will encrypt the XML document, or a specific element. Multiple elements may be encrypted at one time by setting EncryptedDataDetails. The Decrypt method will decrypt the XML document.

The component supports encrypting and decrypting with a shared SymmetricKey, and also using asymmetric encryption to encrypt the SymmetricKey (session key) via the RecipientCert and Certificate properties.

Encrypt

To begin first specify a XML document by calling SetInputStream or setting InputFile, or InputXML.

The EncryptedDataDetails property specify the XML element to encrypt. By default the entire XML document is encrypted.

The SymmetricKey property specifies the key which will be used to encrypt the data.

If the RecipientCert property is set, then the SymmetricKey will be encrypted and included in the encrypted data. This allows for the recipient to decrypt the key, with their certificate. Encrypting the symmetric key is also referred to as using a session key. The benefit of using certificate to encrypt and decrypt a session key (SymmetricKey) is that knowledge of the key value is not needed ahead of time to process the encrypted data. Note that if specified, RecipientCert MUST have a RSA key, not a DSA key.

If the RecipientCert property is not set, then the recipient must know the value of SymmetricKey before decrypting the XML. The KeyName setting may be set to provide a key identifier to the recipient.

Optionally set EncryptingAlgorithm, and then call Encrypt to encrypt the XML.

The following properties are applicable when calling this method:

Input and Output Properties

The component will determine the source and destination of the input and output based on which properties are set.

The order in which the input properties are checked is as follows:

When a valid source is found the search stops. The order in which the output properties are checked is as follows:

Decrypt

To begin first specify a XML document by calling SetInputStream or setting InputFile, or InputXML.

The SymmetricKey property specifies the key used to decrypt the data. This may be set before calling Decrypt or inside the EncryptedDataInfo event. The EncryptedDataInfo event fires once for each encrypted element when Decrypt is called.

If the data was encrypted using an session key, set the Certificate property to the certificate with private key before calling Decrypt. The certificate will be used to decrypt the encrypted session key. In this case the SymmetricKey property is ignored.

The following properties are applicable when calling this method:

Input and Output Properties

The component will determine the source and destination of the input and output based on which properties are set.

The order in which the input properties are checked is as follows:

When a valid source is found the search stops. The order in which the output properties are checked is as follows:

Property List


The following is the full list of the properties of the bean with short descriptions. Click on the links for further details.

CertificateThe certificate used for decryption.
EncryptedDataDetailsA collection of encrypted data details.
EncryptingAlgorithmThen encryption algorithm used when encrypting.
InputFileThe XML file to process.
InputXMLThe XML to process.
OutputFileThe output file.
OutputXMLThe output XML after processing.
OverwriteIndicates whether or not the component should overwrite files.
RecipientCertThe certificate used for encryption.
SymmetricKeyThe symmetric key used to encrypt and decrypt the XML.

Method List


The following is the full list of the methods of the bean with short descriptions. Click on the links for further details.

configSets or retrieves a configuration setting .
decryptDecrypts the XML.
doEventsProcesses events from the internal message queue.
encryptEncrypts the XML.
resetResets the component.
setInputStreamSets the stream from which the component will read data to encrypt or decrypt.
setOutputStreamThe stream to which the component will write the encrypted or decrypted XML.

Event List


The following is the full list of the events fired by the bean with short descriptions. Click on the links for further details.

EncryptedDataInfoFired once for each encrypted element when Decrypt is called.
ErrorInformation about errors during data delivery.
ProgressFired as progress is made.
StatusProvides information about the current operation.

Configuration Settings


The following is a list of configuration settings for the bean with short descriptions. Click on the links for further details.

KeyNameThe name of the key used to encrypt the XML.
LogLevelSpecifies the level of detail that is logged.
EncryptedKeyXPathThe XPath of the EncryptedKey element.
OAEPParamsThe hex encoded OAEP parameters.
MGF1HashAlgorithmThe MGF1 hash algorithm used with OAEP.
RSAHashAlgorithmThe RSA hash algorithm used when encrypting a key.
UseOAEPWhether to use Optimal Asymmetric Encryption Padding (OAEP).
ReadFromProgressEventWhether to read input data from inside the progress event.
WriteToProgressEventWhether to write output data so it is accessible from inside the progress event.
DecryptWithCryptoAPIWhether to use the Crypto API for decrypt operations.
CodePageThe system code page used for Unicode to Multibyte translations.

 
 
Copyright (c) 2017 /n software inc. - All rights reserved.
Build 9.0.6240.0