Sorry to be picky, and maybe this is premature optimization, but the new code is pretty wasteful. Construct a BigInteger, toString() on that, maybe construct another sting with leading zero, and append that into a StringBuilder, toString() on that, and then toUppper or toLower it. That's six lines and a lot of intermediate steps. The previous, simple loop was five and avoided it all.
Sorry to be picky, and maybe this is premature optimization, but the new code is pretty wasteful. Construct a BigInteger, toString() on that, maybe construct another sting with leading zero, and append that into a StringBuilder, toString() on that, and then toUppper or toLower it. That's six lines and a lot of intermediate steps. The previous, simple loop was five and avoided it all.
Feel free to push back.