Hash.HasEqualMD5

Top  Previous  Next

Checks to see if the hash for both values is equal.

 

Syntax

function Hash.HasEqualMD5(Value1, Value2: string): boolean

 

Description

Creates MD5 hash values for both of the supplied values and compares these against eachother.

 

Value1, Value2 hold string values that will be hashed.

 

The Return Value is TRUE if the hash values are equal, FALSE otherwise.

 

See Also

Hash.GetMD5
Hash.IsEqualMD5

 

Example

execute UDSBlock returns (str_value varchar(100))

as

begin

  /* creates 2 hashes */

  hash1 = Hash.GetMD5('value 1');

  hash2 = Hash.GetMD5('value 2');

  /* compare hash values */

  str_value = Hash.IsEqualMD5(hash1, hash2);

  suspend; /* returns False */

  

  str_value = Hash.IsEqualMD5(hash1, hash1);

  suspend; /* returns True */

  

  str_value = Hash.HasEqualMD5('value 1', 'value 1');

  suspend; /* returns True */

end