github.com/Ilhicas/nomad@v1.0.4-0.20210304152020-e86851182bc3/website/content/docs/job-specification/hcl2/functions/crypto/sha512.mdx (about) 1 --- 2 layout: docs 3 page_title: sha512 - Functions - Configuration Language 4 sidebar_title: sha512 5 description: |- 6 The sha512 function computes the SHA512 hash of a given string and encodes it 7 with hexadecimal digits. 8 --- 9 10 # `sha512` Function 11 12 `sha512` computes the SHA512 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 SHA512 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 > sha512("hello world") 23 309ecc489c12d6eb4cc40f50c902f2b4d0ed77ee511a7c7a9bcd3ca86d4cd86f989dd35bc5ff499670da34255b45b0cfd830e81f605dcf7dc5542e93ae9cd76f 24 ```