Public Function CRC32String( _ ByVal vValue As Variant _ , Optional ByVal vStartCRC As Variant _ ) As Variant
CRC32String("A") = -740712821 CRC32String("AB") = 812207111 CRC32String("DCBA") = -2072346770 CRC32String("ABCD") = -619241307 CRC32String(EveryCharacter) = 688229491See also:
CRC32File Function Checksum16 Function Checksum32 Function CRC32Init FunctionvValue: String for which the 32-bit CRC value will be calculated. Function returns Null if vValue is Null or cannot be fixed up to a String.
vStartCRC: The starting CRC value. vStartCRC defaults to &HFFFFFFFF (2^32 - 1 unsigned long; -1 signed long) if it is missing or Null or cannot be fixed up to a number. The default CRC value of &HFFFFFFFF should be used in most cases where the CRC of a single string is to be calculated. This argument is provided for those cases where the CRC of a file is to be calculated one block at a time.
Note: This function returns a Long integer value which really represents an unsigned long value. The most-significant-bit of the return value really represents the most significant bit of an unsigned value; it does not represent the sign bit of a signed value. For example, negative return values represent the values within the range from 2^31 through 2^32-1.
v1.1 BugBix: Corrected a bug in this function that might have caused it to not work in v1.0. For some reason, VB 4.0 was truncating all of the Long hex Constants that were required by this function.
Tip: We suggest using Long decimal Constants (like -1&) instead of Long hex Constants (like &HFFFFFFFF) wherever possible.
Copyright 1996-1999 Entisoft
Entisoft Tools is a trademark of Entisoft.