Allows to create a checksum for a string or blob element.
Synopsis
string cryptoHash(blob|string data, string algorithm = "MD5");
Parameter
Parameter |
Description |
data |
String or blob element for which a checksum shall be created. |
algorithm |
Following algorithms are available:
|
Return value
hash value in hexadecimal format
Error
In case of an error an empty string will be returned and a corresponding message will be displayed in the LogViewer.
Description
The function cryptoHash() allows to create a checksum for elements of the data types string and blob. Additionally the algorithm for creating the checksum can be stated.
example
Following example creates a checksum for the string s and displays it inside the logviewer. The algorithm "MD5" will be used.
main()
{
string s = "Example String";
DebugN(cryptoHash(s));
}
Assignment
Availability
CTRL
See also