public String hash(String key) {
        if (digester != null) {
            byte[] bytes = digester.digest(key.getBytes());
            return bytesToHexString(bytes);
        } else {
            return Integer.toHexString(key.hashCode());
        }
    }
public String hash ( String key ) { if ( digester != null ) { byte [ ] bytes = digester . digest ( key . getBytes ( ) ) ; return bytesToHexString ( bytes ) ; } else { return Integer . toHexString ( key . hashCode ( ) ) ; } }
A hashing method that changes a string (like a URL) into a hash suitable
for using as a disk filename.