I have an application that transfers data to another app via (serial/CAN/Ethernet/can-and-string/cheese stream ion a macaroni pipe/whatever). I have set up a send and acknowlege paradigm so I know when the receiver has all of the data, but I need to know that what the other end received is correct. What does the SDF do for me?
I have an application that receives a file from a native application. The application send me a ‘checksum’ along with the data and the native guys tell me that I must use that checksum value to make sure that the data I received has not been corrupted. I vaguely understand what a checksum is, but I have no clue how to calculate one from the file. What does the SDF do for me?
[Tested on a custom PXA270-based Windows CE 5.0 device *and* the desktop (full framework 2.0)]
Here’s what usage for a file looks like. This creates a 32-bit checksum (we support 8-64 bit) using a standard ploynomial (we support any custom polynomial too):
FileStream fs = File.OpenRead(sourceFileName);
uint checksum = (uint)OpenNETCF.CRC.GenerateChecksum(fs, 32, (ulong)OpenNETCF.CRCPolynomial.CRC_CCITT32);