Function

Gckstring_from_chars

Declaration [src]

gchar*
gck_string_from_chars (
  const guchar* data,
  gsize max
)

Description [src]

Create a string from a set of PKCS#11 characters. This is similar to g_strndup(), except for that it also strips trailing spaces. These space padded strings are often used in PKCS#11 structures.

If the space padded string is filled with null characters then this function will return NULL.

This function is not directly available to language bindings

Parameters

data const guchar*
 

The character data to turn into a null terminated string.

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

The maximum length of the charater data.

Return value

Returns: gchar*
 

The null terminated string.

 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.