How to use `bcrypt` algorithm within `encrypt` function in MySQL for verifying password?

后端 未结 1 751
不知归路
不知归路 2020-12-06 05:57

I have bcrypted value($2y$10$zQaDT8hXM4pLmBdwN0xEseda/oKJAQKMKMzUrV8jbs6Epz28BXzBS) of password (qwe). But when I am verifying I am getting wrong r

相关标签:
1条回答
  • 2020-12-06 06:25

    You can't. The MySQL ENCRYPT() function uses the operating system's crypt() function — if your operating system does not support bcrypt hashes, MySQL will not support them either.

    Also, do not use the MySQL ENCRYPT() function. As ircmaxell noted, any data you pass to a MySQL query may end up in server log files, so it's potentially unsafe to use it for anything password-related.

    0 讨论(0)
提交回复
热议问题