The sha1_file() function calculates the SHA-1 hash of a file.The sha1_file() function uses the US Secure Hash Algorithm 1.
string sha1_file ( string $filename [, bool $raw_output = FALSE ] )
Calculates the sha1 hash of the file specified by filename using the ยป US Secure Hash Algorithm 1, and returns that hash. The hash is a 40-character hexadecimal number.
Parameter | Description |
---|---|
filename | The filename of the file to hash. |
raw_output | When TRUE, returns the digest in raw binary format with a length of 20. |
Returns a string on success, FALSE otherwise.