MD5()

Function description

MD5() function A widely used hash function to generate a 32-character hexadecimal MD5 hash of a string that converts an input message of any length into a 128-bit (16-byte) hash value, usually expressed as a 32-bit hexadecimal string. If the parameter is NULL, NULL is returned.

Function Syntax

Text
> MD5(str)

Parameter definition

Parameters

Description

str

Required parameters. String to convert

Example

Text
mysql> select md5("hello world");
+----------------------------------+
| md5(hello world)                 |
+----------------------------------+
| 5eb63bbbe01eeed093cb22bb8f5acdc3 |
+----------------------------------+
1 row in set (0.00 sec)

mysql> select md5(null);
+-----------+
| md5(null) |
+-----------+
| NULL      |
+-----------+
1 row in set (0.00 sec)
Last updated on