### Class

# Gck Password

#### Description [src]

    class Gck.Password : Gio.TlsPassword
    {
      /* No available fields */
    }

Represents a password which is requested of the user.

This is used in conjuction with `GTlsInteraction`. `GckPassword` is a `GTlsPassword` which contains additional information about which PKCS#11 token or key the password is being requested for.

#### Hierarchy

#### Ancestors

- GTlsPassword
- GObject

#### Instance methods

###### gck_password_get_key

If the password request is to unlock a PKCS#11 key, then this is the the object representing that key.

###### gck_password_get_module

Get the PKCS#11 module that is requesting the password.

###### gck_password_get_token

If the password request is to unlock a PKCS#11 token, then this is the slot containing that token.

##### Methods inherited from GTlsPassword (9)

###### g_tls_password_get_description

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

###### g_tls_password_get_flags

Get flags about the password.

###### 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.).

###### 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().

###### g_tls_password_set_description

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

###### g_tls_password_set_flags

Set flags about the password.

###### g_tls_password_set_value

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

###### g_tls_password_set_value_full

Provide the value for this password.

###### 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().

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

Please see GObject for a full list of methods.

#### Properties

###### Gck.Password:key

The PKCS#11 key that the password is being requested for. If this is set then the GckPassword:token property will be `NULL`.

###### Gck.Password:module

The PKCS#11 module that is requesting the password.

###### Gck.Password:token

The PKCS#11 token the password is for, if this is set then the GckPassword:object property will be `NULL`.

##### Properties inherited from GTlsPassword (3)

###### Gio.TlsPassword:description

Description of what the password is for.

###### Gio.TlsPassword:flags

Flags about the password.

###### Gio.TlsPassword:warning

Warning about the password.

#### 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.

#### Class structure

    struct GckPasswordClass {
      GTlsPasswordClass parent;

    }

The class struct for `GckPassword`.

###### Class members

`parent: GTlsPasswordClass`

  Parent class.