github.com/Ilhicas/nomad@v1.0.4-0.20210304152020-e86851182bc3/website/content/docs/job-specification/hcl2/functions/crypto/md5.mdx (about)

     1  ---
     2  layout: docs
     3  page_title: md5 - Functions - Configuration Language
     4  sidebar_title: md5
     5  description: |-
     6    The md5 function computes the MD5 hash of a given string and encodes it
     7    with hexadecimal digits.
     8  ---
     9  
    10  # `md5` Function
    11  
    12  `md5` computes the MD5 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 MD5 algorithm is applied
    16  as defined in [RFC 1321](https://tools.ietf.org/html/rfc1321). The raw hash is
    17  then encoded to lowercase hexadecimal digits before returning.
    18  
    19  Before using this function for anything security-sensitive, refer to
    20  [RFC 6151](https://tools.ietf.org/html/rfc6151) for updated security
    21  considerations applying to the MD5 algorithm.
    22  
    23  ## Examples
    24  
    25  ```shell-session
    26  > md5("hello world")
    27  5eb63bbbe01eeed093cb22bb8f5acdc3
    28  ```