I am trying to write a small demo application where two programs
exchange information and an HMAC (hmacmd5). With the Java cryptograpy
extension, I can create a random key, and use this as the key for the
mac. However, I would like the key to be set before the exchange takes
place, not generated randomly. For instance, I call up the receiving
party and say that the key is "wizard", they then put this key in the
HMAC object, run the sent text file through it. The receiving party
then verifies that the mac is the same using the agreed upon secret
key.
Obviously, secure data exchange can be done via public/private
cryptography. I'm mainly interested in investigating how to use the
cryptography API's, specifically how to use the MAC classes.
Eric