secret.value

Module for [Value] class

class Value

Types 1

A value containing a secret

A #SecretValue contains a password or other secret value.

Use [secret.value.Value.get] to get the actual secret data, such as a password. The secret data is not necessarily null-terminated, unless the content type is "text/plain".

Each #SecretValue has a content type. For passwords, this is text/plain. Use [secret.value.Value.getContentType] to look at the content type.

#SecretValue is reference counted and immutable. The secret data is only freed when all references have been released via [secret.value.Value.unref].

Methods
void * _cPtr(Flag!"Dup" dup = No.Dup)
GType _gType() @property
Value self()Returns `this`, for use in `with` statements.
secret.value.Value newFull(string secretData, string contentType, glib.types.DestroyNotify destroy)Create a #SecretValue for the secret data passed in.
ubyte[] get()Get the secret data in the #SecretValue.
string getContentType()Get the content type of the secret value, such as `text/plain`. Returns: the content type
string getText()Get the secret data in the #SecretValue if it contains a textual value.
string unrefToPassword(ref size_t length)Unreference a #SecretValue and steal the secret data in #SecretValue as nonpageable memory.
Constructors
this(void * ptr, Flag!"Take" take)
this(string secret, string contentType)Create a #SecretValue for the secret data passed in.