Function

FwupdPlugincommon_crc8_full

since: 1.7.1

Declaration [src]

guint8
fu_common_crc8_full (
  const guint8* buf,
  gsize bufsz,
  guint8 crc_init,
  guint8 polynomial
)

Description [src]

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

Available since: 1.7.1

Parameters

buf

Type: const guint8*

Memory buffer.

The data is owned by the caller of the function.
bufsz

Type: gsize

Size of buf.

crc_init

Type: guint8

Initial CRC value, typically 0x00

polynomial

Type: guint8

CRC polynomial, e.g. 0x07 for CCITT.

Return value

Type: guint8

CRC value.