code: public static byte[] hash(byte[] data, String alg) throws NoSuchAlgorithmException {
  		MessageDigest md = MessageDigest.getInstance(alg);
  		return md.digest(data);
  	}
docs: Hashes data with the specified hashing algorithm.
  
  @since 1.1
  @param data the data to hash
  @param alg the hashing algorithm to use
  @return the hash of the data
  @throws NoSuchAlgorithmException the algorithm is not supported by existing providers