Create Hash | TEXT_HASH

Syntax

TEXT_HASH( [value], [encoding = "hex"], [algorithm = "sha256"] )

Parameters

value
The TEXT to generate the hash for. If it is not a TEXT value, it will be set to an empty TEXT.

encoding optional
The encoding for the output. If not provided, the output will be encoded as hexadecimal. Valid values are:

algorithm
The algorithm used to generate the hash. If not provided, the sha256 algorithm will be used. Valid values are:

Return Value

A TEXT in the specified ENCODING that is the calculated hash of the VALUE.

Description

Generate a hash for a TEXT.

Examples

TEXT_HASH("the message to hash here", "hex", "sha256")
# returns "983564913cd4151d38b1af858da66c653658fcacdc1866134e915b60aded1e78"