CreateHash
Definition:
CreateHash(data, algorithm, encoding)
Description:
Create an encryption hash value from a specified string.
Platforms:
All
Parameters:
data - required
String to be hashed.
algorithm - required
Specify the type of hashing algorithm to use to create the hash value. Can have one of the following values:
"SHA-512"
"SHA-256"
"SHA1"
"MD5"
"MD4"
The values above are listed in order of decreasing security.
encoding - required
Specify the Unicode format in which the string in the data parameter above is formatted:
"UTF-16" - The input string is formatted using Unicode UTF-16 format, e.g. SQL Server nchar or nvarchar data type.
"UTF-8" - The input string is formatted using Unicode UTF-8 format, e.g. SQL Server char or varchar data type.
Returns:
String containing the hash value generated from the input string.
Notes:
If you are specifying UTF-8 encoding, make sure your supplied value doesn't include UTF-16 characters, such as £ or € symbols, otherwise if you attempt to compare the hash value returned by this Method with a hashed value obtained from elsewhere the hashes might not match.