Encrypts "clear text" data by using TEA cipher.
Unit
Syntax
ParametersAKey [in] A key for encryption from TEADeriveKey function.
AData [in] A data to encrypt.
AEncryptedData [out] An encrypted AData's data. Must have the same size as AData. Data is returned in little-endian format.
ADataSize [in] Size of AData/AEncryptedData.
AData [in] String "clear text" data to encrypt.
AInPlaceData [in, out] On input: "clear text" buffer to encrypt. On output: encrypted buffer (same size, lettle-endian).
Return valueEncrypted AData's data in a string form. Data is returned in little-endian format.
RemarksThis function encrypts data passed in AData parameter by symmetric TEA cipher and outputs encrypted data back to AEncryptedData parameter. AEncryptedData expected to have the same size as AData. In other words, symmetric encryption with TEA does not change the size of the data.
The overload variant with RawByteString encrypts AData parameter and outputs encrypted data as function's result.
The overload variant with AInPlaceData encrypts 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
|