GetChecksum

Top  Previous  Next

 

The GetChecksum Special Function Command allows you to retrieve a checksum of the specified file formatted as a string.

lamp Important: Special Function commands can only be used on the right hand side of a Variable Assignment command.

Command Syntax

 

GetChecksum,[InputString],[HashType]

 

The comma character after the command is compulsory as are the input string and hash type parameters.

 

Parameters:

 

InputString: A string from which to get the checksum value.

HashType: The hash algorithm to be used to generate the checksum. This must be a string representing a valid member of the HastType enumeration, currently one of the following values: MD5, SHA1, SHA256, SHA384, SHA512

 

Both parameters are compulsory. If any required parameter is missing or invalid an error will be thrown. The InputString parameter must be surrounded by quotation marks if one or more commas or pipe characters are included. It is good practice to include the quotation marks in any case, so that it reduces the risk of error when writing scripts.

 

Example:

 

Retrieve the checksum of a specified string

 

Var:TestChecksum=GetChecksum,"Get me a checksum of this string",SHA256

 

See Also: Special Functions GetBuildFileVersion GetFileNameVersion GetMajorFileVersion GetMinorFileVersion GetRevisionFileVersion GetRegistryValue IncrementFileVersion