mysql-函数:加密函数

root@localhost:stu>select md5('apple'); -- 更常用
+----------------------------------+
| md5('apple')                     |
+----------------------------------+
| 1f3870be274f6c49b3e31a0c6728957f |
+----------------------------------+
1 row in set (0.00 sec)

root@localhost:stu>select md5('banana'); -- 更常用
+----------------------------------+
| md5('banana')                    |
+----------------------------------+
| 72b302bf297a228a75730123efef7c41 |
+----------------------------------+
1 row in set (0.00 sec)
root@localhost:stu>select sha('apple'); -- 更安全的加密方式
+------------------------------------------+
| sha('apple')                             |
+------------------------------------------+
| d0be2dc421be4fcd0172e5afceea3970e2f3d940 |
+------------------------------------------+
1 row in set (0.00 sec)

root@localhost:stu>select sha('banana'); -- 更安全的加密方式
+------------------------------------------+
| sha('banana')                            |
+------------------------------------------+
| 250e77f12a5ab6972a0895d290c4792f0a326ea8 |
+------------------------------------------+
1 row in set (0.00 sec)

你可能感兴趣的:(mysql-函数:加密函数)