Digester { public static String sha1(String bytes, Charset charset) { return sha1(bytes.getBytes(charset)); }  static String sha256(String bytes, Charset charset); static String sha256(byte[] bytes); static String sha1(String bytes, Charset charset); static String sha1(byte[] bytes); static String md5(String bytes, Charset charset); static String md5(byte[] bytes); static MessageDigest getDigest(String algorithm);  }
@Test public void sha1() { String hello = Digester.sha1("hello", charset); assertThat(hello, equalTo("aaf4c61ddcc5e8a2dabede0f3b482cd9aea9434d")); }