I need to check if the code burned on the some Arduino is the same one as I have. I know how to get the hex file from the Arduino. My question is what influence the hex code? Board Type? Microprocessor type? avrdude version? anything else?
The lines in a typical hex file include a VLI (variable length indicator). The hex files output from the IDE might have different lengths than those produced by avrdude. As a simple example:
Those files will compare differently to each other but convey the same information, split differently between lines.
To do a genuine comparison you would need to account for that.
Different boards, but with the same processor, might have identical files.
Different processor would almost certainly have different hex files.
Probably not, however see my comments above about the VLIs.
As I said, the compiler may generate lines with (say) 16 bytes per line, but avrdude might read back lines with 32 bytes per line. Thus they would look different but convey the same hex codes, once you allow for that.