getFileCryptoHash()
Allows to create a checksum for a file.
Synopsis
string getFileCryptoHash(string fileName, string algorithm =
"MD5");
Parameter
Parameter | Description |
---|---|
fileName | Name or path of the file |
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 getFileCryptoHash() allows to create a checksum for a file. Additionally the algorithm for creating the checksum can be stated.
example
Following example creates a checksum for the login.pnl and displays it inside the logviewer. The algorithm "MD5" will be used.
main()
{
string s = "login.pnl";
DebugN(getFileCryptoHash(s));
}
Assignment
Availability
CTRL, UI