public static String hash(String data) {
        return hash(data, "MD5");
    }
Hashes a String using the Md5 algorithm and returns the result as a
String of hexadecimal numbers. This method is synchronized to avoid
excessive MessageDigest object creation. If calling this method becomes
a bottleneck in your code, you may wish to maintain a pool of
MessageDigest objects instead of using this method.
<p>
A hash is a one-way function -- that is, given an
input, an output is easily computed. However, given the output, the
input is almost impossible to compute. This is useful for passwords
since we can store the hash and a hacker will then have a very hard time
determining the original password.</p>
<p>
In Jive, every time a user logs in, we simply
take their plain text password, compute the hash, and compare the
generated hash to the stored hash. Since it is almost impossible that
two passwords will generate the same hash, we know if the user gave us
the correct password or not. The only negative to this system is that
password recovery is basically impossible. Therefore, a reset password
method is used instead.</p>

@param data the String to compute the hash of.
@return a hashed version of the passed-in String
xmppserver/src/main/java/org/jivesoftware/util/StringUtils.java