Encrypt and decrypt data with the TEA (Tiny Encryption Algorithm) block cipher.
The TEA component is used to encrypt and decrypt data with the TEA (Tiny Encryption Algorithm) block cipher.
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:
- OutputMessage: The output data is written to this property if no other destination is specified.
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.
A simple example:
Component.InputFile = "C:\MyFile.txt"; Component.OutputFile = "C:\Encrypted.txt"; Component.KeyPassword = "password"; Component.Encrypt();
The following is the full list of the properties of the component with short descriptions. Click on the links for further details.
|Algorithm||The TEA algorithm.|
|CipherMode||The cipher mode of operation.|
|InputFile||The file to process.|
|InputMessage||The message to process.|
|IV||The initialization vector (IV).|
|Key||The secret key for the symmetric algorithm.|
|KeyPassword||A password to generate the Key and IV .|
|OutputFile||The output file when encrypting or decrypting.|
|OutputMessage||The output message after processing.|
|Overwrite||Indicates whether or not the component should overwrite files.|
|PaddingMode||The padding mode.|
|UseHex||Whether input or output is hex encoded.|
The following is the full list of the methods of the component with short descriptions. Click on the links for further details.
|config||Sets or retrieves a configuration setting.|
|decrypt||Decrypts the data.|
|decryptBlock||Decrypts a block and returns the decrypted data.|
|encrypt||Encrypts the data.|
|encryptBlock||Encrypts data and returns the encrypted block.|
|reset||Resets the component.|
|setInputStream||Sets the stream from which the component will read data to encrypt or decrypt.|
|setOutputStream||Sets the stream to which the component will write encrypted or decrypted data.|
The following is the full list of the events fired by the component with short descriptions. Click on the links for further details.
|Error||Information about errors during data delivery.|
|Progress||Fired as progress is made.|
The following is a list of configuration settings for the component with short descriptions. Click on the links for further details.
|BlockSize||The block size, in bits, of the cryptographic operation.|
|CloseInputStreamAfterProcessing||Determines whether or not the input stream is closed after processing.|
|CloseOutputStreamAfterProcessing||Determines whether or not the output stream is closed after processing.|
|IncludeIV||Whether to prepend the IV to the output data and read the IV from the input data.|
|KeyPasswordAlgorithm||The hash algorithm used to derive the Key and IV from the KeyPassword property.|
|KeyPasswordIterations||The number of iterations performed when using KeyPassword to derive the Key and IV.|
|KeyPasswordSalt||The salt value used in conjunction with the KeyPassword to derive the Key and IV.|
|KeySize||The size, in bits, of secret key for the symmetric algorithm.|
|TEARounds||The number of rounds for TEA and XTEA.|
|XTEAAlgorithm||The XTEA algorithm.|
|BuildInfo||Information about the product's build.|
|GUIAvailable||Tells the component whether or not a message loop is available for processing events.|
|LicenseInfo||Information about the current license.|
|UseDaemonThreads||Whether threads created by the component are daemon threads.|
|UseInternalSecurityAPI||Tells the component whether or not to use the system security libraries or an internal implementation.|