The list of methods to do Base16 Encode are organized into topic(s).
String
base16Encode(byte[] data) Return a base 16 String representation of the byte[] passed as argument
if (data == null) {
return null;
StringBuffer sb = new StringBuffer();
for (int i = 0; i < data.length; i++) {
int d = data[i];
String s = Integer.toString(d + 128, 16);
if (s.length() < 2) {
...
byte[]
base16toByte(String str) baseto Byte
if (str == null)
throw new IllegalArgumentException("The parameter should not be null!");
final char[] hex = str.toLowerCase().toCharArray();
final int hexLen = str.length();
if (hexLen % 2 != 0)
throw new IllegalArgumentException("The parameter length should be even!");
byte[] bytes = new byte[hexLen / 2];
for (int i = 0, j = 0; i < hexLen; i += 2, ++j) {
...