@Test public void testSha1() { assertEquals("da39a3ee5e6b4b0d3255bfef95601890afd80709", DigestUtil.sha1("")); assertEquals("8843d7f92416211de9ebb963ff4ce28125932878", DigestUtil.sha1("foobar")); }
public static String sha1(String s) { try { return encodeHex(digest("SHA1", s.getBytes("utf8"))); } catch (UnsupportedEncodingException e) { throw new Error(e); } }
DigestUtil { public static String sha1(String s) { try { return encodeHex(digest("SHA1", s.getBytes("utf8"))); } catch (UnsupportedEncodingException e) { throw new Error(e); } } }
DigestUtil { public static String sha1(String s) { try { return encodeHex(digest("SHA1", s.getBytes("utf8"))); } catch (UnsupportedEncodingException e) { throw new Error(e); } }  }
DigestUtil { public static String sha1(String s) { try { return encodeHex(digest("SHA1", s.getBytes("utf8"))); } catch (UnsupportedEncodingException e) { throw new Error(e); } }  static String sha1(String s); }
DigestUtil { public static String sha1(String s) { try { return encodeHex(digest("SHA1", s.getBytes("utf8"))); } catch (UnsupportedEncodingException e) { throw new Error(e); } }  static String sha1(String s);  }