Utility.ComputeCRC Method

Computes a cyclic redundancy check (CRC) from the specified byte array buffer.

Namespace: Microsoft.SPOT.Hardware
Assembly: Microsoft.SPOT.Hardware (in microsoft.spot.hardware.dll)

Syntax

[MethodImplAttribute]
public static UInt32 ComputeCRC (
         byte[] buf,
         intoffset,
         intlength,
         UInt32crc
)

Parameters

  • buf
    A buffer of data from which the CRC is computed.
  • offset
    The offset from the beginning of the specified array to the beginning of the data to be checked.
  • length
    The number of bytes of data to be checked, starting from the offset. The value -1 indicates that all data in the buffer starting from the offset is to be checked.
  • crc
    A seed for the CRC calculation.

Return Value

A CRC value.

Remarks

This method uses the IEEE 802.3 CRC-32 Zmodem protocol to compute the CRC.

Version Information

Available in the .NET Micro Framework versions 2.0, 2.5, 3.0, 4.0, and 4.1.

See Also

Reference

Utility Class
Utility Members
Microsoft.SPOT.Hardware Namespace