Computes the CRC-32 checksum of an ANSI string.
Public Declare Function CRC_String Lib "diCryptoSys.dll"
(ByVal strInput As String, ByVal nOptions As Long) As Long
nRet = CRC_String(strData, nOptions)
int32_t __stdcall CRC_String(const char *szInput, long nOptions);
The value of the CRC-32 checksum.
Crc.Data Method (String)
crc32.StringHex
Public Function StringHex(ByVal strData As String) As String
See crc32.StringHex
.
static int crsysapi::Crc::String (const std::string &s)
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 strData As String
Dim nCRC As Long
strData = "123456789"
nCRC = CRC_String(strData, 0)
Debug.Print "CRC32(" & strData & ")=" & Hex(nCRC)
should output
CRC32(123456789)=CBF43926