### Class

# Gio TlsPassword

since: 2.30

#### Description

    class Gio.TlsPassword : GObject.Object
    {
      priv: GTlsPasswordPrivate*
    }

An abstract interface representing a password used in TLS. Often used in user interaction such as unlocking a key storage token.

Available since: 2.30

#### Ancestors

- GObject

#### Constructors

###### g_tls_password_new

Create a new `GTlsPassword` object.

since: 2.0

#### Instance methods

###### g_tls_password_get_description

Get a description string about what the password will be used for.

since: 2.30

###### g_tls_password_get_flags

Get flags about the password.

since: 2.30

###### g_tls_password_get_value

Get the password value. If `length` is not `NULL` then it will be filled in with the length of the password value. (Note that the password value is not nul-terminated, so you can only pass `NULL` for `length` in contexts where you know the password will have a certain fixed length.)

since: 2.30

###### g_tls_password_get_warning

Get a user readable translated warning. Usually this warning is a representation of the password flags returned from g_tls_password_get_flags().

since: 2.30

###### g_tls_password_set_description

Set a description string about what the password will be used for.

since: 2.30

###### g_tls_password_set_flags

Set flags about the password.

since: 2.30

###### g_tls_password_set_value

Set the value for this password. The `value` will be copied by the password object.

since: 2.30

###### g_tls_password_set_value_full

Provide the value for this password.

since: 2.30

###### g_tls_password_set_warning

Set a user readable translated warning. Usually this warning is a representation of the password flags returned from g_tls_password_get_flags().

since: 2.30

##### Methods inherited from GObject (43)

Please see GObject for a full list of methods.

#### Properties

###### Gio.TlsPassword:description

Description of what the password is for.

since: 2.30

###### Gio.TlsPassword:flags

Flags about the password.

since: 2.30

###### Gio.TlsPassword:warning

Warning about the password.

since: 2.30

#### Signals

##### Signals inherited from GObject (1)

###### GObject::notify

The notify signal is emitted on an object when one of its properties has its value set through g_object_set_property(), g_object_set(), et al.

since: 2.0

#### Class structure

    struct GioTlsPasswordClass {
      GObjectClass parent_class;
      const guchar* (* get_value) (
        GTlsPassword* password,
        gsize* length
      );
      void (* set_value) (
        GTlsPassword* password,
        guchar* value,
        gssize length,
        GDestroyNotify destroy
      );
      const gchar* (* get_default_warning) (
        GTlsPassword* password
      );

    }

Class structure for `GTlsPassword`.

###### Class members

`parent_class: GObjectClass`
  No description available.
`get_value: const guchar* (* get_value) ( GTlsPassword* password, gsize* length )`

  Virtual method for `g_tls_password_get_value()`

`set_value: void (* set_value) ( GTlsPassword* password, guchar* value, gssize length, GDestroyNotify destroy )`

  Virtual method for `g_tls_password_set_value()`

`get_default_warning: const gchar* (* get_default_warning) ( GTlsPassword* password )`

  Virtual method for `g_tls_password_get_warning()` if no value has been set using `g_tls_password_set_warning()`

#### Virtual methods

###### Gio.TlsPasswordClass.get_default_warning

Virtual method for `g_tls_password_get_warning()` if no value has been set using `g_tls_password_set_warning()`

since: 2.0

###### Gio.TlsPasswordClass.get_value

Get the password value. If `length` is not `NULL` then it will be filled in with the length of the password value. (Note that the password value is not nul-terminated, so you can only pass `NULL` for `length` in contexts where you know the password will have a certain fixed length.)

since: 2.30

###### Gio.TlsPasswordClass.set_value

Provide the value for this password.

since: 2.30