Menu
Amazon Redshift
Database Developer Guide (API Version 2012-12-01)

FUNC_SHA1 Function

The FUNC_SHA1 function uses the SHA1 cryptographic hash function to convert a variable-length string into a 40-character string that is a text representation of the hexadecimal value of a 160-bit checksum.

Syntax

Copy
FUNC_SHA1(string)

Arguments

string

A variable-length string.

Return Type

The FUNC_SHA1 function returns a 40-character string that is a text representation of the hexadecimal value of a 160-bit checksum.

Example

The following example returns the 160-bit value for the word 'Amazon Redshift':

Copy
select func_sha1('Amazon Redshift');