github.com/anth0d/nomad@v0.0.0-20221214183521-ae3a0a2cad06/website/content/docs/job-specification/hcl2/functions/crypto/sha512.mdx (about)

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