(byte[] data)
| 73 | private static byte[] toUtf8(Object o) { return toString(o).getBytes(StandardCharsets.UTF_8); } |
| 74 | |
| 75 | public static String binaryToHex(byte[] data) { |
| 76 | StringBuilder sb = new StringBuilder(data.length * 2); |
| 77 | for (byte b : data) sb.append(String.format("%02x", b)); |
| 78 | return sb.toString(); |
| 79 | } |
| 80 | |
| 81 | public static String BinaryToBase64(byte[] buff) { |
| 82 | return Base64.getEncoder().encodeToString(buff); |
no test coverage detected