### Question:
Hashing { public static byte[] sha(String plaintext) throws NoSuchAlgorithmException{ byte[] encodedhash = null; MessageDigest digest = MessageDigest.getInstance("SHA-384"); encodedhash = digest.digest( plaintext.getBytes(StandardCharsets.UTF_8)); return encodedhash; }  static byte[] sha(String plaintext); static boolean matchSHA(byte[] sha1, byte[] sha2); static boolean verifySHA(byte[] sha, String plaintext);  }### Answer:
@Test public void testSha() throws NoSuchAlgorithmException { log.debug("sha"); byte[] expResult = StringUtils.hexStringToByteArray(hexOfHashOfPlainText); byte[] result = Hashing.sha(plaintext); String byteArrayToHexString = StringUtils.byteArrayToHexString(result); assertArrayEquals(expResult, result); }