IPWorks Encrypt 2020 Android Edition

Questions / Feedback?

EzCrypt Component

Properties   Methods   Events   Configuration Settings   Errors  

The EzCrypt component can be used to encrypt and decrypt data through various cryptographic algorithms.

Syntax

IPWorksEncrypt.Ezcrypt

Remarks

The EzCrypt component can be used to encrypt and decrypt data through various cryptographic algorithms. The following algorithms are supported:

  • AES
  • Blowfish
  • CAST
  • DES
  • IDEA
  • RC2
  • RC4
  • TEA
  • TripleDES
  • Twofish
  • Rijndael
  • ChaCha
  • XSalsa20
The Algorithm property specifies which algorithm is used.

To begin simply specify the data you wish to encrypt or decrypt.

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:

When using streams you may need to additionally set CloseInputStreamAfterProcessing or CloseOutputStreamAfterProcessing.

Before encrypting you must have a valid Key and IV. There are a few options available to you in regards to key management. The easiest option is to simply set KeyPassword. When KeyPassword is set the component will automatically create a Key and IV using the PKCS5 password digest algorithm. This means there is only one value you need to keep track of.

If you wish to have more control over the Key and IV values you may specify the properties yourself. If IV is left empty, one will be created for you when you call Encrypt or Decrypt.

A simple example:

Component.InputFile = "C:\MyFile.txt";
Component.OutputFile = "C:\Encrypted.txt";
Component.KeyPassword = "password";
Component.Encrypt();

Property List


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

AlgorithmThe symmetric algorithm.
CipherModeThe cipher mode of operation.
InputFileThe file to process.
InputMessageThe message to process.
IVThe initialization vector (IV).
KeyThe secret key for the symmetric algorithm.
KeyPasswordA password to generate the Key and IV .
OutputFileThe output file when encrypting or decrypting.
OutputMessageThe output message after processing.
OverwriteIndicates whether or not the component should overwrite files.
PaddingModeThe padding mode.
UseHexWhether input or output is hex encoded.

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 data.
decryptBlockDecrypts a block and returns the decrypted data.
encryptEncrypts the data.
encryptBlockEncrypts data and returns the encrypted block.
resetResets the component.
setInputStreamSets the stream from which the component will read data to encrypt or decrypt.
setOutputStreamSets the stream to which the component will write encrypted or decrypted data.

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.

ErrorInformation about errors during data delivery.
ProgressFired as progress is made.

Configuration Settings


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

BlockSizeThe block size, in bits, of the cryptographic operation.
CloseInputStreamAfterProcessingDetermines whether or not the input stream is closed after processing.
CloseOutputStreamAfterProcessingDetermines whether or not the output stream is closed after processing.
IncludeIVWhether to prepend the IV to the output data and read the IV from the input data.
KeyPasswordAlgorithmThe hash algorithm used to derive the Key and IV from the KeyPassword property.
KeyPasswordIterationsThe number of iterations performed when using KeyPassword to derive the Key and IV.
KeyPasswordSaltThe salt value used in conjunction with the KeyPassword to derive the Key and IV.
KeySizeThe size, in bits, of secret key for the symmetric algorithm.
Salsa20AlgorithmThe Salsa20 algorithm to use.
SalsaRoundsThe number of rounds to perform.
TeaAlgorithmThe TEA algorithm.
BuildInfoInformation about the product's build.
GUIAvailableTells the component whether or not a message loop is available for processing events.
LicenseInfoInformation about the current license.
UseDaemonThreadsWhether threads created by the component are daemon threads.
UseInternalSecurityAPITells the component whether or not to use the system security libraries or an internal implementation.

Copyright (c) 2022 /n software inc. - All rights reserved.
IPWorks Encrypt 2020 Android Edition - Version 20.0 [Build 8155]