+ 2

Can someone help me please? How to hash password in SQL.

Sololearn doesn’t have SQL playground so I added the code to PHP I want to hash the password inserted in the users table but I’m getting an error: FUNCTION dolphin_crm.HashBytes does not exist https://code.sololearn.com/wBa5lb2x13K7/?ref=app

4th Dec 2022, 12:52 AM
Triz
Triz - avatar
3 odpowiedzi
+ 4
Hashbytes is not a standard SQL function, I think it only works in MS SQL Server. You mentioned mysql in tags, so you need to use what your database engine supports. Try sha() or sha2() functions (see documentation for correct arguments). https://dev.mysql.com/doc/refman/8.0/en/encryption-functions.html
4th Dec 2022, 9:52 AM
Tibor Santa
Tibor Santa - avatar
+ 1
Tibor Santa thank you very much!
4th Dec 2022, 7:34 PM
Triz
Triz - avatar
5th Dec 2022, 8:24 AM
Calviղ
Calviղ - avatar