1---
2layout: "language"
3page_title: "filesha1 - Functions - Configuration Language"
4sidebar_current: "docs-funcs-crypto-filesha1"
5description: |-
6  The filesha1 function computes the SHA1 hash of the contents of
7  a given file and encodes it as hex.
8---
9
10# `filesha1` Function
11
12`filesha1` is a variant of [`sha1`](./sha1.html)
13that hashes the contents of a given file rather than a literal string.
14
15This is similar to `sha1(file(filename))`, but
16because [`file`](./file.html) accepts only UTF-8 text it cannot be used to
17create hashes for binary files.
18