sha1_file

In cryptography, SHA-1 is a cryptographic hash function designed by the United States National Security Agency and is employed in several widely used applications popular Git where it is used to check for file changes, and the protocols TLS and SSL, PGP, SSH, S/MIME, and IPsec. This function will take an input file and return a 160 bit message digest in ASCII format unique to that file to be used for integrity verification at any later date.

NOTE: SHA-1 is not completely secure and can be broken. See this page for more info.

 

Syntax:

sha1_file(filename)

 

Argument Description
filename The file to generate the sha1 hash for.

 

Returns:

String

 

Example:

hash = sha1_file(working_directory + "game_data.ini")

The above code will generate a sha1 hash for the specified file and store the returned value in the variable "hash".