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)
int32_t __stdcall CRC_File(const char *szFileName, long nOptions);
The value of the CRC-32 checksum.
crc32.FileHex
Public Function FileHex(ByVal strFileName As String) As String
See crc32.FileHex
.
static int crsysapi::Crc::File (const std::string &fileName)
static Crc.file(filename)
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.
A return value of zero probably indicates that the file could not be found, or that the file is empty.
The chances of a file with random contents giving a CRC checksum of zero is one in 4.5 billion, but it is not difficult to
construct a file with such a checksum.
Dim nCRC As Long
nCRC = CRC_File("hello.txt", 0)
Debug.Print "CRC32('hello.txt')=" & Hex(nCRC)