AppStreamCompose.compute_content_checksum_for_data
Description: Reference for AppStreamCompose.compute_content_checksum_for_data

### Function

# AppStreamComposecompute_content_checksum_for_data

since: 1.1.3

#### Declaration [src]

    gchar*
    asc_compute_content_checksum_for_data (
      const gchar* data,
      gsize length
    )

#### Description [src]

Compute a checksum for the given content.

The output of this function is intended to be used with %asc_build_component_global_id to form a unique global ID. The generated checksum is intended to be used as content-ID. Do not assume it is cryptographically secure or has a certain length!

Available since: 1.1.3

#### Parameters

`data`

  Type: `const gchar*`

  The data to hash.

  The data is owned by the caller of the function.
  The value is a NUL terminated UTF-8 string.

`length`

  Type: `gsize`

  Length of `data`.

#### Return value

Type: `gchar*`

The hash as hexadecimal string. Free with %g_free.

The caller of the function takes ownership of the data, and is responsible for freeing it.
The value is a NUL terminated UTF-8 string.