SHA256

Applies to: ✅ Data 360 SQL ✅ Tableau Hyper API

Calculates the SHA-256 hash of data, returning the result as binary data.

Syntax 

1sha256(<data>)

Arguments 

Required 

  • <data>: The text or bytea data to hash.

Returns 

Returns a bytea that contains the SHA-256 hash.

Considerations 

  • SHA-256 is cryptographically secure.
  • Use encode(sha256(<data>), 'hex') for human-readable hexadecimal output.

Examples 

Calculate SHA-256 Hash 

Get the SHA-256 hash of a string.

1SELECT sha256('abc') AS result;

Returns \xba7816bf8f01cfea414140de5dae2223b00361a396177a9cb410ff61f20015ad.

Related Documentation 

DID THIS ARTICLE SOLVE YOUR ISSUE?
Let us know so we can improve!