1.98 <GTlsPassword>

Class: <GTlsPassword>

It derives from <GObject>.

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

Fields

parent-instance
priv

Properties

Property: tls-password:description self

Description of what the password is for.

Its value is a string, or #f.

Set it with (set! (tls-password:description self) value).

Property: tls-password:flags self

Flags about the password.

Its value is a <GTlsPasswordFlags> (or, to set it, a list of its symbols, or one of them).

Set it with (set! (tls-password:flags self) value).

Property: tls-password:warning self

Warning about the password.

Its value is a string, or #f.

Set it with (set! (tls-password:warning self) value).

Procedures

Method: tls-password:get-description self ⇒ %return
Method: get-description self ⇒ %return

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

self

Passed: a <GTlsPassword>.

a <GTlsPassword> object

%return

Returned: a string.

The description of the password.

Method: tls-password:get-flags self ⇒ %return
Method: get-flags self ⇒ %return

Get flags about the password.

self

Passed: a <GTlsPassword>.

a <GTlsPassword> object

%return

Returned: a <GTlsPasswordFlags>.

The flags about the password.

Method: tls-password:get-value self ⇒ %return
Method: get-value self ⇒ %return

Get the password value. If length is not #f 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 #f for length in contexts where you know the password will have a certain fixed length.)

self

Passed: a <GTlsPassword>.

a <GTlsPassword> object

%return

Returned: a bytevector.

The password value (owned by the password object).

length

Not returned: it is the length of %return.

location to place the length of the password.

Method: tls-password:get-warning self ⇒ %return
Method: get-warning self ⇒ %return

Get a user readable translated warning. Usually this warning is a representation of the password flags returned from tls-password:get-flags.

self

Passed: a <GTlsPassword>.

a <GTlsPassword> object

%return

Returned: a string.

The warning.

Procedure: tls-password:new flags description ⇒ %return

Create a new <GTlsPassword> object.

flags

Passed: a <GTlsPasswordFlags>, or a list of its symbols, or one of them.

the password flags

description

Passed: a string.

description of what the password is for

%return

Returned: a <GTlsPassword>.

The newly allocated password object

Method: tls-password:set-description self description
Method: set-description self description

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

self

Passed: a <GTlsPassword>.

a <GTlsPassword> object

description

Passed: a string.

The description of the password

Method: tls-password:set-flags self flags
Method: set-flags self flags

Set flags about the password.

self

Passed: a <GTlsPassword>.

a <GTlsPassword> object

flags

Passed: a <GTlsPasswordFlags>, or a list of its symbols, or one of them.

The flags about the password

Method: tls-password:set-value self value
Method: set-value self 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.)

self

Passed: a <GTlsPassword>.

a <GTlsPassword> object

value

Passed: a bytevector, or a list or vector, each an unsigned 8-bit integer.

the new password value

length

Not passed: guile-gi gives the length of value.

the length of the password, or -1

Method: tls-password:set-value-full self value [destroy]
Method: set-value-full self value [destroy]

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

self

Passed: a <GTlsPassword>.

a <GTlsPassword> object

value

Passed: a bytevector, or a list or vector, each an unsigned 8-bit integer.

the value for the password

destroy

Passed, or left out: a procedure, or #f.

a function to use to free the password.

See GDestroyNotify for how it is called.

length

Not passed: guile-gi gives the length of value.

the length of the password, or -1

Method: tls-password:set-warning self warning
Method: set-warning self warning

Set a user readable translated warning. Usually this warning is a representation of the password flags returned from tls-password:get-flags.

self

Passed: a <GTlsPassword>.

a <GTlsPassword> object

warning

Passed: a string.

The user readable warning

Virtual methods

Virtual method: tls-password:do-get-default-warning implementor self ⇒ %return

virtual method for tls-password:get-warning if no value has been set using tls-password:set-warning

To override it in a new class, give register-type #:vfuncs `((get-default-warning . ,procedure)). The procedure is called as (procedure self) ⇒ %return.

implementor

Passed: the class whose implementation to call: <GTlsPassword>, or a class that derives from it, or its GType number.

self

Passed: a <GTlsPassword>.

%return

Returned: a string.

Virtual method: tls-password:do-get-value implementor self ⇒ %return

Get the password value. If length is not #f 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 #f for length in contexts where you know the password will have a certain fixed length.)

To override it in a new class, give register-type #:vfuncs `((get-value . ,procedure)). The procedure is called as (procedure self) ⇒ %return.

implementor

Passed: the class whose implementation to call: <GTlsPassword>, or a class that derives from it, or its GType number.

self

Passed: a <GTlsPassword>.

a <GTlsPassword> object

%return

Returned: a bytevector.

The password value (owned by the password object).

length

Not returned: it is the length of %return.

location to place the length of the password.

Virtual method: tls-password:do-set-value implementor self value [destroy]

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

To override it in a new class, give register-type #:vfuncs `((set-value . ,procedure)). The procedure is called as (procedure self value destroy).

implementor

Passed: the class whose implementation to call: <GTlsPassword>, or a class that derives from it, or its GType number.

self

Passed: a <GTlsPassword>.

a <GTlsPassword> object

value

Passed: a bytevector, or a list or vector, each an unsigned 8-bit integer.

the value for the password

destroy

Passed, or left out: a procedure, or #f.

a function to use to free the password.

See GDestroyNotify for how it is called.

length

Not passed: guile-gi gives the length of value.

the length of the password, or -1