What is the role of `MessageDigest` in JCA?
`MessageDigest` computes a one-way hash for data, but it cannot be used for encryption or decryption of data.
Thatâ€™s partially correct. `MessageDigest` is used for hashing data but not for encryption or decryption, which is handled by the `Cipher` class.
Can you describe the difference between a hash function and an encryption algorithm in the context of JCA?