Share via


ComputeCRC Method

[This documentation is for preview only, and is subject to change in later releases. Blank topics are included as placeholders.]

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

Namespace:  Microsoft.SPOT.Hardware
Assembly:  Microsoft.SPOT.Native (in Microsoft.SPOT.Native.dll)

Syntax

'Declaration
Public Shared Function ComputeCRC ( _
    buf As Byte(), _
    offset As Integer, _
    length As Integer, _
    crc As UInteger _
) As UInteger
public static uint ComputeCRC(
    byte[] buf,
    int offset,
    int length,
    uint crc
)
public:
static unsigned int ComputeCRC(
    array<unsigned char>^ buf, 
    int offset, 
    int length, 
    unsigned int crc
)
static member ComputeCRC : 
        buf:byte[] * 
        offset:int * 
        length:int * 
        crc:uint32 -> uint32 
public static function ComputeCRC(
    buf : byte[], 
    offset : int, 
    length : int, 
    crc : uint
) : uint

Parameters

  • buf
    Type: array<System. . :: . .Byte> [] () [] []
    A buffer of data from which the CRC is computed.
  • offset
    Type: System. . :: . .Int32
    The offset from the beginning of the specified array to the beginning of the data to be checked.
  • length
    Type: System. . :: . .Int32
    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.

Return Value

Type: System. . :: . .UInt32
A CRC value.

Remarks

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

.NET Framework Security

See Also

Reference

Utility Class

Microsoft.SPOT.Hardware Namespace