Computes the CRC-32 checksum of an array of bytes.
Public Declare Function CRC_Bytes Lib "diCryptoSys.dll"
(ByRef lpInput As Byte, ByVal nBytes As Long, ByVal nOptions As Long) As Long
nRet = CRC_Bytes(abData(0), nBytes, nOptions)
' Note the "(0)" after the byte array parameters
int32_t __stdcall CRC_Bytes(const unsigned char *lpInput, long nBytes, long nOptions);
The value of the CRC-32 checksum.
Crc.Data Method (Byte[])
static int crsysapi::Crc::Bytes (const bvec_t &data)
static Crc.bytes(data)
The CRC-32 checksum is a 32-bit integer value.
The CRC-32 algorithm uses the polynomial 0x04C11DB7
and is the one specified in ISO 3309 and ITU-T V.42 and used by WinZip.
Dim abData() As Byte Dim nLen As Long Dim nCRC As Long Dim i As Long nLen = 9 ReDim abData(nLen - 1) ' Create a 9-byte array equal to "123456789" For i = 0 To nLen - 1 abData(i) = i + Asc("1") Next nCRC = CRC_Bytes(abData(0), nLen, 0) Debug.Print "CRC32=" & Hex(nCRC)