Aller au contenu principal

sha1file

Calculate the sha1 hash of a file.

SHA1FILE

NAME

sha1file - Calculates the sha1 (secure hash algorithm) of a file.

SYNOPSIS

sha1file(string filepath,error)

DESCRIPTION

Calculates the sha1 hash of the file specified by filepath, and returns that hash. The hash is a 40-character hexadecimal number.

PARAMETERS

string
File path.
error
Triggers the error if the file does not exists.

RETURN

Returns the hash as a 40-character hexadecimal number.

EXAMPLES

Note: In the followings examples, the _ between the { should be removed to make it work.

in:  res=<{sha1file("",false)}>.
out: res=da39a3ee5e6b4b0d3255bfef95601890afd80709.

SEE ALSO

{{ include("includes/strings.sn") }}

AUTHOR

Written by Pusnei Sergey and Caroline Laplante, <sergey@sednove.com>

MODIFICATIONS

1.0 2014-09-09 21:24:14 laplante@sednove.com

Edit

© 2024 extenso Inc. All rights reserved.