Message Digest Computation
The message digest of a text is a sort of a fingerprint for any text. Computing the message digest is very useful to prevent "man in the middle" attacks. Because there is only one digest for any given plain text, this can be used to verify the authenticity of the message. Of course, for maximum security, transmission of the message and of its digest should be done using different channels.
The applet bellow uses the MD5 algorithm for computing the message digest. MD5 is currently the most popular method and the probability of getting two different messages with the same digest is way smaller than winning any lottery.
You can view the source code here