How do you increment a hex value in java and keep the padding at the same time?
If you look at this:
Is there any sample Java code that does AES encryption exactly like this website?
You'll see a variable called "keyHex" in the correct answer which represents hex but in string format and padded by a bunch of zeros.
Then I want to increment "keyHex" by 1 and change it from:
"00000000000000000000000000000000"
to
"00000000000000000000000000000001"
I want to keep looping and adding 1 until I reach:
"00000000000000000000000000FFFFFF"
For obvious reasons I cannot do "keyHex++", so I would appreciate it if someone can point me in the right direction.