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.
buffer_crc32(buffer, offset, size);
Argument | Type | Description |
---|---|---|
buffer | Buffer | The buffer to use. |
offset | Real | The data offset value. |
size | Real | The size of the buffer. |
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.