

 Amazon Redshift will no longer support the creation of new Python UDFs starting Patch 198. Existing Python UDFs will continue to function until June 30, 2026. For more information, see the [ blog post ](https://aws.amazon.com/blogs/big-data/amazon-redshift-python-user-defined-functions-will-reach-end-of-support-after-june-30-2026/). 

# SHA1 function
SHA1

The 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
Syntax

SHA1 is a synonym of [SHA function](SHA.md) and [FUNC\$1SHA1 function](FUNC_SHA1.md). 

```
SHA1(string)
```

## Arguments
Arguments

 *string*   
A variable-length string.

## Return type
Return type

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

## Example
Example

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

```
select sha1('Amazon Redshift');
```