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

XMLEncrypt Component

Properties   Methods   Events   Configuration Settings   Errors  

The XMLEncrypt component is used to encrypt and decrypt XML.

Syntax

TipcXMLEncrypt

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 the EncryptedDataDetail* properties. 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 Cer* properties.

Encrypt

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

The EncryptedDataDetail* properties 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* properties are 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* properties are 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:
  • OutputFile
  • OutputXML: The output data is written to this property if no other destination is specified.

Decrypt

To begin first specify a XML document by 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 Cert* properties 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:
  • OutputFile
  • OutputXML: The output data is written to this property if no other destination is specified.

Property List


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

CertEncodedThe certificate (PEM/base64 encoded).
CertStoreThe name of the certificate store for the client certificate.
CertStorePasswordIf the certificate store is of a type that requires a password, this property is used to specify that password in order to open the certificate store.
CertStoreTypeThe type of certificate store for this certificate.
CertSubjectThe subject of the certificate used for client authentication.
EncryptedDataDetailCountThe number of records in the EncryptedDataDetail arrays.
EncryptedDataDetailIdThis property is an optional identifier for the encrypted data.
EncryptedDataDetailMIMETypeThis property specifies the MIME type of the encrypted data.
EncryptedDataDetailScopeThis property specifies the scope of the encryption.
EncryptedDataDetailXMLElementThis property specifies the XPath to the element which will be encrypted.
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.
RecipientCertEncodedThe certificate (PEM/base64 encoded).
RecipientCertStoreThe name of the certificate store for the client certificate.
RecipientCertStorePasswordIf the certificate store is of a type that requires a password, this property is used to specify that password in order to open the certificate store.
RecipientCertStoreTypeThe type of certificate store for this certificate.
RecipientCertSubjectThe subject of the certificate used for client authentication.
SymmetricKeyThe symmetric key used to encrypt and decrypt the XML.

Method List


The following is the full list of the methods of the component 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.

Event List


The following is the full list of the events fired by the component 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 component 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