Handlebars sha512
Handlebars sha512: returns the SHA-512 digest of a string as hex.
Next
Runtime verified
Test scripts included
Returns the SHA-512 digest of a string as hex. One-way and not safe for protecting secrets.
Syntax
{{sha512 text [...options]}}
Returns string.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
text |
string | Yes | The text to hash. |
options |
any | No, repeatable | Named argument charset: UTF-8 (default) or UTF-16. |
Example
Tested in a Marketing Cloud Next email on 2026-11-22:
{{sha512 "abc"}}rendersddaf35a193617abacc417349ae20413112e6fa4e89a97ea20a9eeee64b55d39a2192992a274fc1a836ba3c23a3feebbd454d4423643ce80e2a9ac94fa54ca49f, as documented.
Show Next test script
Marketing Cloud Next
Works as documented
Every tested call rendered the documented result. Tested 2026-11-22 by rendering in a Marketing Cloud Next email.
See also
- AMPscript
SHA512— does a similar job in AMPscript, with a different call shape - Official reference