assistance-engine/docs/developer.avapframework.com/appendices_7.md

1.1 KiB

encodeMD5()

The encodeMD5() command generates an MD5 hash of the provided string and stores the result in a target variable. MD5 is a cryptographic hash function that produces a 128-bit value (32 hexadecimal characters), commonly used to verify data integrity.

Parameters

  • SourceVariable Type: var Description: The variable containing the text string to be encoded in MD5. It can be a direct value or a variable storing the input string.
  • TargetVariable Type: var Description: The variable in which the resulting MD5 hash will be stored. Unlike the SourceVariable parameter, this must be a variable and not a direct value.

Usage Example

// Direct call with values:
encodeMD5('example_string', md5Hash)

// Call using variables:
text = 'example_string'
hashVariable = 'md5Hash'
encodeMD5(text, hashVariable)

In the first example, an MD5 hash is generated from the string 'example_string' and stored in the md5Hash variable. In the second example, a variable text is used to define the input string and another variable hashVariable is used to store the resulting MD5 hash.