Best way to encode passwords in PHP

前端 未结 8 1670
死守一世寂寞
死守一世寂寞 2020-12-07 23:51

I currently use,
base64_encode() to encode a user\'s password, this works well because it allows me to simply use base64decode() to dec

8条回答
  •  既然无缘
    2020-12-08 00:02

    You can do the hashing on the server when authenticating in one quick query:

    SELECT * FROM user WHERE password = MD5(CONCAT(?, salt));
    

提交回复
热议问题