To check if a password the user enters matches an encrypted password that’s stored in a database is valid, you can

a. decrypt the password in the database and compare it with the user entry

b. use the password_hash() function to encrypt the user entry and compare it with the encrypted password in the database

c. use digest authentication to automatically encrypt the password and then compare it with the password in the database

d. use the password_verify() function to compare the user entry with the encrypted password in the database

Respuesta :

Answer:

To check if a password the user enters matches an encrypted password that’s stored in a database is valid, you can  use the password_hash() function to encrypt the user entry and compare it with the encrypted password in the database.

Option B is therefore the correct answer.

Explanation:

To check if a password the user enters matches an encrypted password that is stored in a database is valid, you can use hash functions to generate a hash of the entered password and then compare it with the hash of the password stored in the database.

Thus, option B is the correct answer.

Otras preguntas