private int hashToInt(byte[] bytes, int start) {
    DataInput input = new DataInputStream(
        new ByteArrayInputStream(bytes, start, bytes.length - start));
    int val;
    try {
      val = input.readInt();
    } catch (IOException e) {
      throw new IllegalStateException(e);
    }
    return val;
  }
Grabs a positive integer value from the input array starting at
the given offset.
@param bytes the array of bytes
@param start the index into the array to start grabbing bytes
@return the integer constructed from the four bytes in the array
java/com/google/android/apps/authenticator/otp/PasscodeGenerator.java