SHA256
→ stringComputes the SHA-256 hash of a string value and returns it as a hexadecimal string.
Available in:
Email
CloudPage
Automation
Triggered Send
Syntax
Platform.Function.SHA256(value [, encoding])
1–2 arguments
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
value |
string | Yes | String to hash |
encoding |
string | No | Output encoding. Default: "hex" |
Examples
var hash = Platform.Function.SHA256("my-secret-token");
// Use as a cache-busting key or token fingerprint
Platform.Function.InsertData("TokenLog", ["fingerprint"], [hash]);