CRC_File computes the CRC-32 checksum of a file.
Public Declare Function CRC_File Lib "diCryptoSys.dll"
(ByVal strFileName As String, ByVal nOptions As Long) As Long
nRet = CRC_File(strFileName, nOptions)
String specifying the input file.Long option flags: not used in this release. Specify zero.
long _stdcall CRC_File(const char *szFileName, long options);
Long: The return value is the value of the CRC-32 checksum.
crc32.FileHex
Public Function FileHex(ByVal strFileName As String) As String
See crc32.FileHex.
The CRC-32 checksum may be a positive or negative number and is usually represented in hexadecimal.
A return value of zero may indicate that the file could not be found.
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 nCRC As Long
nCRC = CRC_File("hello.txt", 0)
Debug.Print "CRC32('hello.txt')=" & Hex(nCRC)