Message digests, or one-way hash functions, generate fixed-sized signatures from variable-sized texts, in such a way that it is computationally infeasible to determine the source text from the signature or to find a different text that hashes to the same signature.
The following diagram shows the important classes participating in this package:
Here is a simple example of how to use the SHA-1 hash.
IMessageDigest md = HashFactory.getInstance("SHA-1"); md.update(input, 0, input.length); byte[] digest = md.digest();