What is the purpose of `java.security.MessageDigest` in user authentication?
Itâ€™s used to hash passwords and ensure that passwords are not stored in plain text.
Thatâ€™s partially correct. While hashing prevents plain text password storage, `MessageDigest` alone doesn't handle salting.
Can you explain how salting enhances password security when using hashing?