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

     1  ---
     2  layout: docs
     3  page_title: sha256 - Functions - Configuration Language
     4  sidebar_title: sha256
     5  description: |-
     6    The sha256 function computes the SHA256 hash of a given string and encodes it
     7    with hexadecimal digits.
     8  ---
     9  
    10  # `sha256` Function
    11  
    12  `sha256` computes the SHA256 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 SHA256 algorithm is applied
    16  as defined in [RFC 4634](https://tools.ietf.org/html/rfc4634). The raw hash is
    17  then encoded to lowercase hexadecimal digits before returning.
    18  
    19  ## Examples
    20  
    21  ```shell-session
    22  > sha256("hello world")
    23  b94d27b9934d3e08a52e52d7da7dabfac484efe37a5380ee9088f7ace2efcde9
    24  ```