hash/crc32.bi

Summary
hash/crc32.bi
LicenseCopyright © 2007-2011, FreeBASIC Extended Library Development Group
ext.hashes
Functions
crc32Calculates the 32 bit cyclic redundancy check of a memory buffer.
crc32Calculates the 32 bit cyclic redundancy check of a string.

License

Copyright © 2007-2011, FreeBASIC Extended Library Development Group

Distributed under the FreeBASIC Extended Library Group license.  See accompanying file LICENSE.txt or copy at http://code.google.com/p/fb-extended-lib/wiki/License

ext.hashes

Summary
Functions
crc32Calculates the 32 bit cyclic redundancy check of a memory buffer.
crc32Calculates the 32 bit cyclic redundancy check of a string.

Functions

crc32

declare function crc32 overload (byval buf As const any ptr,  
byval buf_len as uinteger,  
byval crc as uinteger =  0) As uinteger

Calculates the 32 bit cyclic redundancy check of a memory buffer.

Parameters

bufpointer to memory buffer.
buf_lenlength of buffer in bytes.
crcoptional value to initialize the hash with, defaults to 0

Returns

uinteger containing the hash.

crc32

declare function crc32 (byref buf as const string) as uinteger

Calculates the 32 bit cyclic redundancy check of a string.

Parameters

bufstring to hash.

Returns

uinteger containing the hash.

declare function crc32 overload (byval buf As const any ptr,  
byval buf_len as uinteger,  
byval crc as uinteger =  0) As uinteger
Calculates the 32 bit cyclic redundancy check of a memory buffer.