private static int toUnsignedInt(byte b) {
    return b & 0xff;
  }
Manual implementation of Byte.toUnsignedByte. The Android JDK does not have this method.
java_src/src/main/java/com/google/crypto/tink/testing/TestUtil.java