SHA1()
This page is part of MariaDB's Documentation.
The parent of this page is: Functions for MariaDB Xpand
Topics on this page:
Overview
Returns an SHA-1 checksum hash as a hexadecimal string.
USAGE
SHA1(string)
Argument Name | Description |
---|---|
| The string whose checksum is returned |
DETAILS
SHA1()
is an encryption function that returns an SHA-1 160-bit checksum as a string of 40 hexadecimal digits for the string function argument.
The SHA-1 hash is not considered to be very strong anymore, so consider using SHA2() instead.
A NULL
is returned if the argument is NULL
.
EXAMPLES
SELECT SHA1('abc');
+------------------------------------------+
| SHA1('abc') |
+------------------------------------------+
| a9993e364706816aba3e25717850c26c9cd0d89d |
+------------------------------------------+