From f8941a5e5490c7c16a37c5965e51fc70e6bfbd33 Mon Sep 17 00:00:00 2001 From: CJ <105300705+cjobermaier@users.noreply.github.com> Date: Fri, 16 Aug 2024 17:27:33 -0500 Subject: [PATCH] Apply suggestions from code review Co-authored-by: Tu Nguyen Co-authored-by: trujillo-adam <47586768+trujillo-adam@users.noreply.github.com> --- website/docs/language/functions/filesha1.mdx | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/website/docs/language/functions/filesha1.mdx b/website/docs/language/functions/filesha1.mdx index 08127d256c..02bfd595c7 100644 --- a/website/docs/language/functions/filesha1.mdx +++ b/website/docs/language/functions/filesha1.mdx @@ -1,6 +1,6 @@ --- page_title: filesha1 - Functions - Configuration Language -description: he filesha1 function computes the SHA1 hash of the contents of a given file and encodes it as hex. +description: The filesha1 function computes the SHA1 hash of the contents of a given file and encodes it as hex. --- # `filesha1` function reference @@ -10,11 +10,9 @@ This topic provides reference information about the `filesha1` function, which c The `filesha1` is a variant of [`sha1`](/terraform/language/functions/sha1) that hashes the contents of a given file rather than a literal string. -This is similar to `sha1(file(filename))`, but -because [`file`](/terraform/language/functions/file) accepts only UTF-8 text it cannot be used to -create hashes for binary files. +Use the `filesha1` function instead of wrapping the `file` function in a `sha1` function, for example `sha1(file(filename))`, because [`file`](/terraform/language/functions/file) accepts only UTF-8 text. As a result, you cannot use `sha1(file(filename))` to create hashes for binary files. -!> **Security warning**: Collision attacks have been successfully performed against this hashing function. Before using this function for anything security-sensitive, review relevant literature to understand the security implications. +!> **Security warning**: This hashing function is susceptible to collision attacks. Before using this function for anything security-sensitive, review relevant literature to understand the security implications. ## Syntax