Trino Supported Functions
Binary Functions
sha256
Computes the SHA256 hash of binary.
Examples:
examples.sql
select sha256('Hello World!') as value; -- value '7f83b1657ff1fc53b92dc18148a1d65dfc2d4b1fa3d677284addd200126d9069'
Supported Signatures
function sha256(varbinary) returns varbinary
sha512
Computes the SHA512 hash of binary.
Examples:
examples.sql
select sha512('Hello World!') as value; -- value '861844d6704e8573fec34d967e20bcfef3d424cf48be04e6dc08f2bd58c729743371015ead891cc3cf1c9d34b49264b510751b1ff9e537937bc46b5d6ff4ecc8'
Supported Signatures
function sha512(varbinary) returns varbinary
to_hex
Encodes binary into a hex string representation.
Examples:
examples.sql
SELECT to_hex(cast(1000 as varbinary)) AS value; -- value 'e8030000'
Supported Signatures
function to_hex(varbinary) returns varchar