### Function

# FwupdPlugin bytes_from_string

#### Declaration [src]

    GBytes*
    fu_bytes_from_string (
      const gchar* str,
      GError** error
    )

#### Description [src]

Converts a lowercase hex string to a `GBytes`.

Available since: | 2.0.5

#### Parameters

`str` | `const gchar*`
| A hex string.
| The data is owned by the caller of the function.
| The value is a NUL terminated UTF-8 string.
`error` | `GError **`
| The return location for a `GError*`, or `NULL`.

#### Return value

Returns: | `GBytes`
| A `GBytes`, or `NULL` on error.
| The caller of the function takes ownership of the data, and is responsible for freeing it.