Calculate File SHA1 (LCC.web_file.sha1)
Signature
hash, err = LCC.web_file.sha1(path, timeout?)
Parameters
- path
String. File to hash. - timeout
Number, optional. Request timeout in seconds, default60.
Returns
- hash
String. 40-character hexadecimal SHA1 digest;nilon failure. - err
String ornil. Error description when the call fails.
Notes
Computes the file's SHA1 digest on the controller.
Returnsnilwith an error message when the path is missing or not a file.
Example
local sha1, err = LCC.web_file.sha1("/assets/config.json")
if sha1 then
print("SHA1=" .. sha1)
end