Value

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.

Constructors

this
this(string secret, ptrdiff_t length, string contentType)

Create a #SecretValue for the secret data passed in.

Members

Functions

get
ubyte[] get()

Get the secret data in the #SecretValue.

getContentType
string getContentType()

Get the content type of the secret value, such as text/plain.

getText
string getText()

Get the secret data in the #SecretValue if it contains a textual value.

unrefToPassword
string unrefToPassword(size_t length)

Unreference a #SecretValue and steal the secret data in #SecretValue as nonpageable memory.

Static functions

newFull
secret.value.Value newFull(string secretData, ptrdiff_t length, string contentType, glib.types.DestroyNotify destroy)

Create a #SecretValue for the secret data passed in.

Inherited Members

From Boxed

cInstancePtr
void* cInstancePtr;

Pointer to the C boxed value

getType
GType getType()

Get the GType of this boxed type.

gType
GType gType [@property getter]

Boxed GType property.

self
Boxed self()

Convenience method to return this cast to a type. For use in D with statements.

copy_
void* copy_()

Make a copy of the wrapped C boxed data.

boxedCopy
void* boxedCopy(void* cBoxed)

Copy a C boxed value using g_boxed_copy.

boxedFree
void boxedFree(void* cBoxed)

Free a C boxed value using g_boxed_free.