Function

SecretValuenew

Declaration [src]

SecretValue*
secret_value_new (
  const gchar* secret,
  gssize length,
  const gchar* content_type
)

Description [src]

Create a SecretValue for the secret data passed in.

The secret data is copied into non-pageable ‘secure’ memory.

If the length is less than zero, then secret is assumed to be null-terminated.

Parameters

secret

Type: const gchar*

The secret data.

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

Type: gssize

The length of the data.

content_type

Type: const gchar*

The content type of the data.

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

Return value

Type: SecretValue

The new SecretValue.

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