Gio.TlsPassword¶
class — extends GObject.Object
An abstract interface representing a password used in TLS. Often used in user interaction such as unlocking a key storage token.
Constructors¶
new¶
Create a new TlsPassword object.
Parameters:
flags— the password flagsdescription— description of what the password is for
Methods¶
get_description¶
Get a description string about what the password will be used for.
get_flags¶
Get flags about the password.
get_value¶
Get the password value. If length is not None 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 None
for length in contexts where you know the password will have a
certain fixed length.)
get_warning¶
Get a user readable translated warning. Usually this warning is a
representation of the password flags returned from
TlsPassword.get_flags.
set_description¶
Set a description string about what the password will be used for.
Parameters:
description— The description of the password
set_flags¶
Set flags about the password.
Parameters:
flags— The flags about the password
set_value¶
Set the value for this password. The value will be copied by the password
object.
Specify the length, for a non-nul-terminated password. Pass -1 as
length if using a nul-terminated password, and length will be
calculated automatically. (Note that the terminating nul is not
considered part of the password in this case.)
Parameters:
value— the new password value
set_value_full¶
Provide the value for this password.
The value will be owned by the password object, and later freed using
the destroy function callback.
Specify the length, for a non-nul-terminated password. Pass -1 as
length if using a nul-terminated password, and length will be
calculated automatically. (Note that the terminating nul is not
considered part of the password in this case.)
Parameters:
value— the value for the passworddestroy— a function to use to free the password.
set_warning¶
Set a user readable translated warning. Usually this warning is a
representation of the password flags returned from
TlsPassword.get_flags.
Parameters:
warning— The user readable warning
Virtual methods¶
do_get_default_warning¶
virtual method for TlsPassword.get_warning if no
value has been set using TlsPassword.set_warning
do_get_value¶
Get the password value. If length is not None 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 None
for length in contexts where you know the password will have a
certain fixed length.)
do_set_value¶
Provide the value for this password.
The value will be owned by the password object, and later freed using
the destroy function callback.
Specify the length, for a non-nul-terminated password. Pass -1 as
length if using a nul-terminated password, and length will be
calculated automatically. (Note that the terminating nul is not
considered part of the password in this case.)
Parameters:
value— the value for the passworddestroy— a function to use to free the password.
Properties¶
description¶
Description of what the password is for.
flags¶
Flags about the password.
warning¶
Warning about the password.