Function
FwupdPlugininput_stream_compute_crc32
since: 2.0.0
Declaration [src]
gboolean
fu_input_stream_compute_crc32 (
GInputStream* stream,
guint32* crc,
guint32 polynomial,
GError** error
)
Description [src]
Returns the cyclic redundancy check value for the given memory buffer.
NOTE: The initial crc
differs from fu_crc32_full()
in that it is inverted (to make it
symmetrical, and chainable), so for most uses you want to use the value of 0x0, not 0xFFFFFFFF.
Available since: 2.0.0
Parameters
stream
-
Type:
GInputStream
A
GInputStream
.The data is owned by the caller of the function. crc
-
Type:
guint32*
Initial and final CRC value, typically 0x0
The argument will be set by the function. polynomial
-
Type:
guint32
CRC polynomial, typically 0xEDB88320
error
-
Type:
GError **
The return location for a recoverable error.
The argument can be NULL
.If the return location is not NULL
, then you must initialize it to aNULL
GError*
.The argument will be left initialized to NULL
by the function if there are no errors.In case of error, the argument will be set to a newly allocated GError
; the caller will take ownership of the data, and be responsible for freeing it.