Gio.TlsPassword¶
- Subclasses:
None
Methods¶
- Inherited:
- Structs:
class |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Virtual Methods¶
- Inherited:
|
|
|
Properties¶
Name |
Type |
Flags |
Short Description |
---|---|---|---|
r/w |
Description of what the password is for |
||
r/w |
Flags about the password |
||
r/w |
Warning about the password |
Signals¶
- Inherited:
Fields¶
- Inherited:
Name |
Type |
Access |
Description |
---|---|---|---|
parent_instance |
r |
Class Details¶
- class Gio.TlsPassword(**kwargs)¶
- Bases:
- Abstract:
No
- Structure:
Holds a password used in TLS.
New in version 2.30.
- classmethod new(flags, description)[source]¶
- Parameters:
flags (
Gio.TlsPasswordFlags
) – the password flagsdescription (
str
) – description of what the password is for
- Returns:
The newly allocated password object
- Return type:
Create a new
Gio.TlsPassword
object.
- get_description()[source]¶
- Returns:
The description of the password.
- Return type:
Get a description string about what the password will be used for.
New in version 2.30.
- get_flags()[source]¶
- Returns:
The flags about the password.
- Return type:
Get flags about the password.
New in version 2.30.
- get_value()[source]¶
- Returns:
The password value (owned by the password object).
- Return type:
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 passNone
for length in contexts where you know the password will have a certain fixed length.)New in version 2.30.
- get_warning()[source]¶
- Returns:
The warning.
- Return type:
Get a user readable translated warning. Usually this warning is a representation of the password flags returned from
Gio.TlsPassword.get_flags
().New in version 2.30.
- set_description(description)[source]¶
- Parameters:
description (
str
) – The description of the password
Set a description string about what the password will be used for.
New in version 2.30.
- set_flags(flags)[source]¶
- Parameters:
flags (
Gio.TlsPasswordFlags
) – The flags about the password
Set flags about the password.
New in version 2.30.
- set_value(value)[source]¶
- Parameters:
value (
bytes
) – the new password 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.)
New in version 2.30.
- set_value_full(value, destroy)[source]¶
- Parameters:
value (
bytes
) – the value for the passworddestroy (
GLib.DestroyNotify
orNone
) – a function to use to free the password.
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.)
New in version 2.30.
- set_warning(warning)[source]¶
- Parameters:
warning (
str
) – The user readable warning
Set a user readable translated warning. Usually this warning is a representation of the password flags returned from
Gio.TlsPassword.get_flags
().New in version 2.30.
- do_get_value() virtual¶
- Returns:
The password value (owned by the password object).
- Return type:
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 passNone
for length in contexts where you know the password will have a certain fixed length.)New in version 2.30.
- do_set_value(value, destroy) virtual¶
- Parameters:
value (
bytes
) – the value for the passworddestroy (
GLib.DestroyNotify
orNone
) – a function to use to free the password.
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.)
New in version 2.30.
Property Details¶
- Gio.TlsPassword.props.description¶
-
Description of what the password is for
- Gio.TlsPassword.props.flags¶
- Name:
flags
- Type:
- Default Value:
- Flags:
Flags about the password