c++ - CRC calculation output -


is 0 possible checksum cyclic redundancy check (crc)?

i'm using boost calculate crc:

const unsigned int crcpolynomial = 0x11021; const unsigned short initialvalue = 0xffff; boost::crc_optimal<16, crcpolynomial, initialvalue, 0, true, true> crc; // process bytes... int x = crc.checksum(); // <------ can 0? 

yes. take message, x, , compute crc, crc(x). crc(x . crc(x)) 0 (where . denotes concatenation).

in fact, relationship can used verify message + crc has been transmitted correctly (see instance second animated diagram @ http://en.wikipedia.org/wiki/computation_of_crc).


Comments