xHarbour Reference Documentation > Function Reference xHarbour Developers Network  

Hb_CRC32()

Calculates the checksum for a stream of data using the CRC 32 algorithm.

Syntax

HB_CRC32( <cString> ) --> nCRC32

Arguments

<cString>
This is a character string to calulate the checksum for.

Return

The function returns the calculated checksum as a numeric value.

Description

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
FunctionAlgorithmRelative Speed
HB_CheckSum()Adler 32 bit1.00
HB_CRC32()CRC 32 bit1.46
HB_MD5()MD5 128 bit4.51

Info

See also:HB_CheckSum(), HB_MD5()
Category: Checksum functions , xHarbour extensions
Source:rtl\hbcrc32.c
LIB:xhb.lib
DLL:xhbdll.dll


Copyright © 2006-2007 xHarbour.com Inc. All rights reserved.
http://www.xHarbour.com
Created by docmaker.exe