+ 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
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
+ 1
Tibor Santa thank you very much!
+ 1
Use password_hash method
https://code.sololearn.com/wbELu1rNpHA7/?ref=app