Can someone point me to a good PHP/MySQL salted hashed password implementation?

后端 未结 8 734
感情败类
感情败类 2021-02-06 07:33

After reading about salts password hashing Id like to implement a simple version for an admin area to a site Im building.

If you have any good links with code that have

8条回答
  •  你的背包
    2021-02-06 08:05

    Registration process: User enters a password. System generates a salt value from random data (could be a hash of the time & PID or something). Systems generates a hash value of the password & salt value and stores both of these in the registration table.

    Login process: User enters a password. System pulls the salt value from the database and hashes it and the password and compares that against the hashed password value put into the database during registration.

    The plaintext password is never stored in the database. The salt value is never visible to the client.

提交回复
热议问题