Initializes TEA key from password via MD5 HMAC.
Unit
Syntax
ParametersAPassword [in] User password.
ASalt [in] Salt value. Use InitSalt function to create new salt for encryption and store salt with encrypted data. Use stored salt to decrypt data.
Return valueTEA key derived from APassword and ASalt using MD5 HMAC.
You do not need to free/release/dispose this key - it does not contain any allocated memory. However, it is strongly recommended to call TEADestroyKey function once you have finished working with key - to erase it with zeros.
This value is always the same for the same APassword and same ASalt.
RemarksThis function converts APassword to UTF-8 and then uses MD5HMAC(ASalt, APassword) to derive the key using the specified salt.
You do not need to call this function if you already have RAW binary TEA key (TTEAKey).
You do not need to free/release/dispose this key - it does not contain any allocated memory. However, it is strongly recommended to call TEADestroyKey function once you have finished working with key - to erase it with zeros.
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
|