Function

FwupdPlugincrc16_full

Declaration [src]

guint16
fu_crc16_full (
  const guint8* buf,
  gsize bufsz,
  guint16 crc,
  guint16 polynomial
)

Description [src]

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

Available since:1.8.2

Parameters

buf const guint8*
 

Memory buffer.

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

Size of buf.

crc guint16
 

Initial CRC value, typically 0xFFFF.

polynomial guint16
 

CRC polynomial, typically 0xA001 for IBM or 0x1021 for CCITT.

Return value

Returns: guint16
 

CRC value.