Function

FwupdPlugininput_stream_compute_crc32

Declaration [src]

gboolean
fu_input_stream_compute_crc32 (
  GInputStream* stream,
  FuCrcKind kind,
  guint32* crc,
  GError** error
)

Description [src]

Returns the cyclic redundancy check value for the given memory buffer.

NOTE: The initial crc differs from fu_crc32_step() 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 GInputStream
 

A GInputStream.

 The data is owned by the caller of the function.
kind FuCrcKind
 

A FuCrcKind, typically FU_CRC_KIND_B32_STANDARD.

crc guint32*
 

Initial and final CRC value.

 The argument will be modified by the function.
error GError **
  The return location for a GError*, or NULL.

Return value

Returns: gboolean
 

TRUE for success.