Quote:
Originally Posted by
utamav
Now this makes thing very complicated and I dont understand why. I downloaded a program from the internet while calculates the checksum for a file and gives the crc32 output and it matched perfectly. Now if the crc32 can be displayed in many forms and format the probability of this random program showing me the correct crc32 value is astronomical. Isnt there a standard defined somewhere?
There's lots of standards, but it's not all one giant thing.
CRC32 is just the algorithm. It's standard, but there's several ways to use it -- you get some choice about things like whether the count starts from 0x00000000 or 0xffffffff, whether you use the value or the inverted value, etc.
Ethernet uses crc32 checksums for its frames, so they had to define all the bits CRC32 left open to choice or interpretation to make sure every network card and driver is willing to talk to each other. But network cards don't print anything, so they didn't define anything for that.
cksum is a UNIX standard utility using the CRC32 checksum algorithm from ethernet,
and it defines how to print the number. It's always the same everywhere. (Except Tru64. They had to be special.)
As for every possible output? There's as many ways to print it as your imagination will allow, though most of them are pointless. What's most likely to be different is the number base, and you can convert that. Show me the two different checksums on the same file, and tell me what utility created it, and I might find a way to turn one into the other.