github.com/muratcelep/terraform@v1.1.0-beta2-not-internal-4/website/docs/language/functions/sha1.html.md (about)

     1  ---
     2  layout: "language"
     3  page_title: "sha1 - Functions - Configuration Language"
     4  sidebar_current: "docs-funcs-crypto-sha1"
     5  description: |-
     6    The sha1 function computes the SHA1 hash of a given string and encodes it
     7    with hexadecimal digits.
     8  ---
     9  
    10  # `sha1` Function
    11  
    12  `sha1` computes the SHA1 hash of a given string and encodes it with
    13  hexadecimal digits.
    14  
    15  The given string is first encoded as UTF-8 and then the SHA1 algorithm is applied
    16  as defined in [RFC 3174](https://tools.ietf.org/html/rfc3174). The raw hash is
    17  then encoded to lowercase hexadecimal digits before returning.
    18  
    19  Collision attacks have been successfully performed against this hashing
    20  function. Before using this function for anything security-sensitive, review
    21  relevant literature to understand the security implications.
    22  
    23  ## Examples
    24  
    25  ```
    26  > sha1("hello world")
    27  2aae6c35c94fcfb415dbe95f408b9ce91ee846ed
    28  ```
    29  
    30  ## Related Functions
    31  
    32  * [`filesha1`](./filesha1.html) calculates the same hash from
    33    the contents of a file rather than from a string value.