What is the purpose of `java.security.MessageDigest` in user authentication?
It is used to hash passwords before storing them in a database for secure storage.
Great! You're correct. `MessageDigest` is used for securely hashing passwords.
Can you explain the difference between hashing and encryption when it comes to password storage?