ENCODE()
This page is part of MariaDB's Documentation.
The parent of this page is: Functions for MariaDB Xpand
Topics on this page:
Overview
Encrypts a string using the given key.
USAGE
ENCODE(string, password_string)
Argument Name | Description |
---|---|
| The string that to encode |
| The password to use |
DETAILS
ENCODE()
is a string function that encodes and returns a string using a password.
A NULL
is returned if any argument is NULL
.
For the opposite conversion, see DECODE().
EXAMPLES
SELECT HEX(ENCODE('password', '1@mariadb-#'));
+----------------------------------------+
| HEX(ENCODE('password', '1@mariadb-#')) |
+----------------------------------------+
| 9638C67420E0ECA9 |
+----------------------------------------+