Decrypts encrypted data by using TEA cipher.
Unit
Syntax
ParametersAKey [in] A key for decryption from TEADeriveKey function.
AEncryptedData [in] A data to decrypt. Must not contain salt (see TEADeriveKey). Must be in little-endian format.
AData [out] A decrypted AEncryptedData's "clear text" data. Must have the same size as AEncryptedData.
ADataSize [in] Size of AEncryptedData/AData.
AEncryptedData [in] Encrypted data (in string form) to decrypt. Must not contain salt (see TEADeriveKey). Must be in little-endian format.
AInPlaceData [in, out] On input: encrypted buffer to decrypt. Must not contain salt (see TEADeriveKey). Must be in little-endian format. On output: "clear text" buffer (same size).
Return valueDecrypted "clear text" data.
RemarksThis function decrypts data previosly encrypted with TEAEncrypt function by symmetric TEA cipher. The encrypted data is passed in AEncryptedData parameter. The function outputs decrypted data back to AData parameter. AData expected to have the same size as AEncryptedData. In other words, symmetric decryption with TEA does not change the size of the data.
The overload variant with RawByteString decrypts AEncryptedData parameter and outputs decrypted data as function's result.
The overload variant with AInPlaceData decrypts data "in place".
Tiny Encryption Algorithm (TEA) is a block cipher notable for its simplicity of description and implementation, typically a few lines of code. TEA operates on two 32-bit unsigned integers (could be derived from a 64-bit data block) and uses a 128-bit key.
Examples
See also
|