How should I hash passwords before posting and then using BCRYPT?
问题 I am making a login system, and when logging in the password currently gets sent from JavaScript to a PHP file. In PHP I use the following piece of code to hash. $hash = password_hash($_POST['password'], PASSWORD_BCRYPT); How should I hash the password in JavaScript before sending it using POST? I obviously do not want to affect BCRYPT's security. 回答1: What is done on the client side is not really controlled by you. What I mean is that even if you hash your password it's possible for a client