String () { assert myData.length > 0 : "bad length Hash.data"; byte even = myData[0]; StringBuilder sb = new StringBuilder(); for (int i = 1; i < myData.length; i++) { int k1 = (myData[i] + 128) / 16; int k2 = (myData[i] + 128) % 16; char c1 = Character.forDigit(k1, 16); char c2 = Character.forDigit(k2, 16); if (i == myData.length - 1 && even == 1) { sb.append(c2); } else { sb.append(c1).append(c2); } } return sb.toString(); }