I'm trying to write kotlin code like:
for (byte b : hash)
stringBuilder.append(String.format("%02x", b&0xff));
but I have nothing to do with the "&". I'm trying to use "b and 0xff" but it doesn't work. The bitwise "and" seems to work on Int, not byte.
java.lang.String.format("%02x", (b and 0xff))
it's ok to use
1 and 0xff