Function

FwupdPluginbyte_array_from_string

Declaration [src]

GByteArray*
fu_byte_array_from_string (
  const gchar* str,
  GError** error
)

Description [src]

Converts a lowercase hex string to a byte array.

Available since:1.9.6

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: An array of guint8
 

A GByteArray, or NULL on error.

 The caller of the function takes ownership of the data, and is responsible for freeing it.