public int hash(String s) {
        byte[] md5 = digester.digest(Utf8.toBytes(s));
        int hash = 0;
        assert (md5.length == 16);

        //produce an int by using only the 32 lsb:
        int byte1 = (((int) md5[12]) << 24) & 0xFF000000;
        int byte2 = (((int) md5[13]) << 16) & 0x00FF0000;
        int byte3 = (((int) md5[14]) << 8) & 0x0000FF00;
        int byte4 = (((int) md5[15])) & 0x000000FF;

        hash |= byte1;
        hash |= byte2;
        hash |= byte3;
        hash |= byte4;
        return hash;
    }
Convenience class for hashing a String with MD5, and either returning
an int with the 4 LSBytes, or the whole 12-byte MD5 hash.
<p>
Note that instantiating this class can be expensive, so re-using instances
is a good idea.
<p>
This class is not thread safe.

@author Einar M R Rosenvinge
vespajlib/src/main/java/com/yahoo/collections/MD5.java