DECODE 对 ENCODE() 函数加密的密文进行解密

该函数用来对 ENCODE() 函数加密的密文进行解密。

语法说明

DECODE(crypt_str, pass_str)

参数说明

  • crypt_str 待解密的密文

  • pass_str 解密密码

示例用法

该示例使用 encode() 函数对 “hello world” 字符串加密,然后 decode() 函数对 encode() 函数返回的结果进行解密。加密解密的密码均为 aaaaaa。如下:

mysql> select decode(encode('hello world', 'aaaaaa'), 'aaaaaa');
+---------------------------------------------------+
| decode(encode('hello world', 'aaaaaa'), 'aaaaaa') |
+---------------------------------------------------+
| hello world                                       |
+---------------------------------------------------+
1 row in set (0.05 sec)
关于
本网站属于个人的非赢利性网站,转载的文章遵循原作者的版权声明,如果原文没有版权声明,请来信告知:hxstrive@outlook.com
公众号