HashUtil { public static String hashSHA384(final String s) throws NoSuchAlgorithmException { return hashInBase64(s, SHA_384); } private  HashUtil(); static String hashSHA256(final String s); static String hashSHA384(final String s); static String hashSHA512(final String s); static String base64FromUtf8Bytes(final byte[] bytes); static String hashInBase64(final String s, final String algo); static final String SHA_512; static final String SHA_384; static final String SHA_256; }
@Test public void testHashSHA384() throws NoSuchAlgorithmException { assertEquals("RZDeMlkNh7DS5dfofurW+copvbLj4QY7W/03wLIo2jI33mqXF2xDNbKXnumstQOS", HashUtil.hashSHA384("Hello webfirmframework")); }