code: public static String getChecksum(String algorithm, byte[] bytes) {
          final MessageDigest digest = getMessageDigest(algorithm);
          final byte[] b = digest.digest(bytes);
          return getHex(b);
      }
docs: Calculates the MD5 checksum of a specified bytes.
  
  @param algorithm the algorithm to use (md5, sha1, etc.) to calculate the
  message digest
  @param bytes the bytes to generate the MD5 checksum
  @return the hex representation of the MD5 hash