buffer_crc32

This function will take input data from a buffer and returns a CRC32 checksum hash.

You specify the buffer to use, then an offset value (in bytes) for where to begin, and then a size (again in bytes) for the region to be hashed, and the function will return a 32 bit integer value for that region.

 

Syntax:

buffer_crc32(buffer, offset, size);

ArgumentTypeDescription
bufferBufferThe buffer to use.
offsetRealThe data offset value.
sizeRealThe size of the buffer.

 

Returns:

Real

 

Example:

check_val = buffer_crc32(buff, 0, buffer_get_size(buff));

The above code will create a CRC32 checksum hash value for the full data stored in the buffer indexed by the variable buff, and store the returned integer hash value in the variable check_val.