github.com/hugorut/terraform@v1.1.3/website/docs/language/functions/md5.mdx (about)

     1  ---
     2  page_title: md5 - Functions - Configuration Language
     3  description: |-
     4    The md5 function computes the MD5 hash of a given string and encodes it
     5    with hexadecimal digits.
     6  ---
     7  
     8  # `md5` Function
     9  
    10  `md5` computes the MD5 hash of a given string and encodes it with
    11  hexadecimal digits.
    12  
    13  The given string is first encoded as UTF-8 and then the MD5 algorithm is applied
    14  as defined in [RFC 1321](https://tools.ietf.org/html/rfc1321). The raw hash is
    15  then encoded to lowercase hexadecimal digits before returning.
    16  
    17  Before using this function for anything security-sensitive, refer to
    18  [RFC 6151](https://tools.ietf.org/html/rfc6151) for updated security
    19  considerations applying to the MD5 algorithm.
    20  
    21  ## Examples
    22  
    23  ```
    24  > md5("hello world")
    25  5eb63bbbe01eeed093cb22bb8f5acdc3
    26  ```
    27  
    28  ## Related Functions
    29  
    30  * [`filemd5`](/language/functions/filemd5) calculates the same hash from
    31    the contents of a file rather than from a string value.