public static int createHash(String val,Charset charset,MessageDigest digestFunction){
  return createHash(val.getBytes(charset),digestFunction);
}

public static int createHash ( String val , Charset charset , MessageDigest digestFunction ) { return createHash ( val . getBytes ( charset ) , digestFunction ) ; }
generates a digest based on the contents of a string .
