Check out this piece of code for packet checking in C#. It compares the actual checksum with desired checksum on the basis of two parameters - Length Bit by bit checking with exit when a particular bit does not match. public static bool CheckPacket (byte[] bMD5CheckSum , byte[] bActualCheckSum ) { bool bSame = false; if (bActualCheckSum.Length == bMD5CheckSum.Length) { int iIdx = 0; do { if (bActualCheckSum[iIdx] != bMD5CheckSum[iIdx]) { bSame = false; break; } else bSame = true; iIdx++; } while (iIdx < bActualCheckSum.Length); } else bSame = false; return bSame; } HO HUM ☺
The mark of the man who thinks...sometimes
Poetry, Chess, Programming, Philosophy, Philanthropy etc.
Twitter Handle @petrushkagoogol
External Spaces
https://themindspace.quora.com/?ch=10&oid=2086271&share=396067ef&srid=XrZim&target_type=tribe