sha1_file

Returns a sha1 hash for the given file.

Syntax:

GML Code Example

sha1_file(filename)


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


Returns: String


Description

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.


Example:

GML Code 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".





No Examples Submitted

Does this page need better examples? Be the first to Submit

No Edits Suggested

Is this page unclear or not descriptive enough? Suggest an edit to the page and with enough upvotes your changes will be made.

No Questions Have Been Ask

Do you have a question about this page? Ask it Here