Code to reverse a HEX value and convert to Decimal

Thanks for getting back to me.

PaulS:
What? Why do YOU think the bytes are output in the reverse order?

Because it is necessary to reverse those values and convert to get the correct UID given by a different reader. Converted in the order given, the value is too long.

Also I read that the on the Mifare Classic 1k Datasheet that the UID is stored in 'normal' order and again in reverse, so that is what the reader is spitting out.

PaulS:
How good at math do you have to be to output the data in order 3, 2, 1, 0 instead of 0, 1, 2, 3? It's a one line of code change. Here's a hint: It's the for loop that needs changing.

Not very when it's written out like that, unfortunately I am not good enough at maths/programming to implement the change.

Thank you for pointing me in the right direction, I had a feeling that the key would be to modify the section where it handles the values.

PaulS:
It's a one line of code change

I would greatly appreciate it if you could elaborate or help me a little further, I'm kinda stabbing in the dark, tried changing

for (uint8_t i=0; i < uidLength; i++)

to

for (uint8_t i=0; i < uidLength; i--)

and

Serial.print(" 0x");Serial.print(uid[i], HEX);

to

Serial.print(uid[i], DEC);

But am just getting random (looking) numbers, not my known UID :~