/* * Helper */ private static String doDigestForByteArray(final byte[] bytes, final String algorithm) { try { MessageDigest md = MessageDigest.getInstance(algorithm); byte[] hash = md.digest(bytes); return HexUtil.toString(hash); } catch (NoSuchAlgorithmException e) { e.printStackTrace(); return null; } }
// Log util public static String toString_Hex0xAndDec(int word) { return HexUtil.toHexString0x(word) + " (" + (word & 0xFFFF) + ")"; }