All pages
Powered by GitBook
1 of 1

Loading...

SHA1

Calculate SHA-1 checksum. This function computes the SHA-1 160-bit checksum for a string, returning a 40-character hexadecimal string.

Syntax

SHA1(str), SHA(str)

Description

Calculates an SHA-1 160-bit checksum for the string str, as described in RFC 3174 (Secure Hash Algorithm).

The value is returned as a string of 40 hex digits, or NULL if the argument was NULL. The return value is a nonbinary string in the connection , determined by the values of the and system variables.

Examples

This page is licensed: GPLv2, originally from

SELECT SHA1('some boring text');
+------------------------------------------+
| SHA1('some boring text')                 |
+------------------------------------------+
| af969fc2085b1bb6d31e517d5c456def5cdd7093 |
+------------------------------------------+
character set and collation
character_set_connection
collation_connection
fill_help_tables.sql