バイナリ -> hex 文字列
public static void print(byte[] hash) {
StringBuilder hashStrBuf = new StringBuilder();
for (byte hashByte : hash) {
final String hashHexStr = Integer.toHexString(hashByte & 0xff);
if (hashHexStr.length() == 1) {
hashStrBuf.append("0");
}
hashStrBuf.append(hashHexStr);
}
System.out.println(hashStrBuf.toString());
}