Multiple choice technology security

What is the method signature for hashing password?

  1. String hashPassword(String password)

  2. String hashPassword(String password, String accountName)

  3. String hashpassword(String password)

  4. None of the above

Reveal answer Fill a bubble to check yourself
B Correct answer
Explanation

Secure password hashing requires both the password and a unique salt per user. The hashPassword method takes both password and accountName parameters, where accountName serves as the salt, ensuring that even identical passwords produce different hashes for different accounts.