| xHarbour Reference Documentation > Function Reference |
![]() |
![]() |
![]() |
Calculates the checksum for a stream of data using the CRC 32 algorithm.
HB_CRC32( <cString> ) --> nCRC32
The function returns the calculated checksum as a numeric value.
HB_CRC32() implements the CRC32 algorithm (Cyclic Redundancy Code) for calculating the checksum of a character string. This algorithm computes faster than the algorithm of the HB_MD5() function, but is less reliable. The following table compares the speed of checksum algorithms available in xHarbour:
Algorithm comparison
| Function | Algorithm | Relative Speed |
|---|---|---|
| HB_CheckSum() | Adler 32 bit | 1.00 |
| HB_CRC32() | CRC 32 bit | 1.46 |
| HB_MD5() | MD5 128 bit | 4.51 |
| See also: | HB_CheckSum(), HB_MD5() |
| Category: | Checksum functions , xHarbour extensions |
| Source: | rtl\hbcrc32.c |
| LIB: | xhb.lib |
| DLL: | xhbdll.dll |
http://www.xHarbour.com