Function Reference > Functions > MD5
  

MD5

Calculates the checksum of the input value. The function uses Message-Digest algorithm 5 (MD5). MD5 is a one-way cryptographic hash function with a 128-bit hash value. It calculates a unique value for each input. Use MD5 to verify data integrity.

Syntax

MD5( value )
Argument
Required/
Optional
Description
value
Required
String or Binary datatype. Value for which you want to calculate checksum. The case of the input value affects the return value. For example, MD5(informatica) and MD5(Informatica) return different values.

Return Value

Unique 32-character string of hexadecimal digits 0-9 and a-f.
NULL if the input is a null value.

Example

You want to write changed data to a database. You can use the MD5 function to generate a unique checksum value for a row of data each time you read data from a source. When you run new sessions to read data from the same source, you can compare the previously generated checksum value against new checksum values. You can then write rows with new checksum values to the target. Those rows represent data that is changed in the source.

Tip

You can use the return value as a hash key.