Convert the hex string into a base-10 integer.
@visibleForTesting static int getInt(String hex) => int.parse(hex, radix: 16);