Calculate SHA-1 checksum. This function computes the SHA-1 160-bit checksum for a string, returning a 40-character hexadecimal string.
SHA1(str), SHA(str)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.
This page is licensed: GPLv2, originally from
SELECT SHA1('some boring text');
+------------------------------------------+
| SHA1('some boring text') |
+------------------------------------------+
| af969fc2085b1bb6d31e517d5c456def5cdd7093 |
+------------------------------------------+