Why is the PHP crypt() function returning the same thing for two different strings?
问题 I'm using PHP's crypt function for password hashing/encryption, but I don't think I am doing it right because "nathan12" and "nathan123" both allow me to login to my account on my system (the actual password is "nathan123", and therefore "nathan12" or anything else should NOT allow me to login). Here's what my system does when a user registers: [...] $salt = uniqid(mt_rand(), true); $password = crypt($password, $salt); // '$password' is the inputted password $insertUserStmt = $mysqli->prepare