2
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
3
"http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
4
<refentry id="gnome-keyring-gnome-keyring-password">
6
<refentrytitle role="top_of_page" id="gnome-keyring-gnome-keyring-password.top_of_page">Simple Password Storage</refentrytitle>
7
<manvolnum>3</manvolnum>
8
<refmiscinfo>GNOME-KEYRING Library</refmiscinfo>
12
<refname>Simple Password Storage</refname>
13
<refpurpose>Store and lookup passwords with a set of attributes.</refpurpose>
16
<refsynopsisdiv id="gnome-keyring-gnome-keyring-password.synopsis" role="synopsis">
17
<title role="synopsis.title">Synopsis</title>
20
<link linkend="GnomeKeyringPasswordSchema">GnomeKeyringPasswordSchema</link>;
21
extern const GnomeKeyringPasswordSchema* <link linkend="GNOME-KEYRING-NETWORK-PASSWORD--CAPS">GNOME_KEYRING_NETWORK_PASSWORD</link>;
22
#define <link linkend="GNOME-KEYRING-DEFAULT--CAPS">GNOME_KEYRING_DEFAULT</link>
23
#define <link linkend="GNOME-KEYRING-SESSION--CAPS">GNOME_KEYRING_SESSION</link>
24
<link linkend="gpointer">gpointer</link> <link linkend="gnome-keyring-store-password">gnome_keyring_store_password</link> (const <link linkend="GnomeKeyringPasswordSchema">GnomeKeyringPasswordSchema</link> *schema,
25
const <link linkend="gchar">gchar</link> *keyring,
26
const <link linkend="gchar">gchar</link> *display_name,
27
const <link linkend="gchar">gchar</link> *password,
28
<link linkend="GnomeKeyringOperationDoneCallback">GnomeKeyringOperationDoneCallback</link> callback,
29
<link linkend="gpointer">gpointer</link> data,
30
<link linkend="GDestroyNotify">GDestroyNotify</link> destroy_data,
32
<link linkend="GnomeKeyringResult">GnomeKeyringResult</link> <link linkend="gnome-keyring-store-password-sync">gnome_keyring_store_password_sync</link> (const <link linkend="GnomeKeyringPasswordSchema">GnomeKeyringPasswordSchema</link> *schema,
33
const <link linkend="gchar">gchar</link> *keyring,
34
const <link linkend="gchar">gchar</link> *display_name,
35
const <link linkend="gchar">gchar</link> *password,
37
<link linkend="gpointer">gpointer</link> <link linkend="gnome-keyring-find-password">gnome_keyring_find_password</link> (const <link linkend="GnomeKeyringPasswordSchema">GnomeKeyringPasswordSchema</link> *schema,
38
<link linkend="GnomeKeyringOperationGetStringCallback">GnomeKeyringOperationGetStringCallback</link> callback,
39
<link linkend="gpointer">gpointer</link> data,
40
<link linkend="GDestroyNotify">GDestroyNotify</link> destroy_data,
42
<link linkend="GnomeKeyringResult">GnomeKeyringResult</link> <link linkend="gnome-keyring-find-password-sync">gnome_keyring_find_password_sync</link> (const <link linkend="GnomeKeyringPasswordSchema">GnomeKeyringPasswordSchema</link> *schema,
43
<link linkend="gchar">gchar</link> **password,
45
<link linkend="gpointer">gpointer</link> <link linkend="gnome-keyring-delete-password">gnome_keyring_delete_password</link> (const <link linkend="GnomeKeyringPasswordSchema">GnomeKeyringPasswordSchema</link> *schema,
46
<link linkend="GnomeKeyringOperationDoneCallback">GnomeKeyringOperationDoneCallback</link> callback,
47
<link linkend="gpointer">gpointer</link> data,
48
<link linkend="GDestroyNotify">GDestroyNotify</link> destroy_data,
50
<link linkend="GnomeKeyringResult">GnomeKeyringResult</link> <link linkend="gnome-keyring-delete-password-sync">gnome_keyring_delete_password_sync</link> (const <link linkend="GnomeKeyringPasswordSchema">GnomeKeyringPasswordSchema</link> *schema,
52
<link linkend="void">void</link> <link linkend="gnome-keyring-free-password">gnome_keyring_free_password</link> (<link linkend="gchar">gchar</link> *password);
64
<refsect1 id="gnome-keyring-gnome-keyring-password.description" role="desc">
65
<title role="desc.title">Description</title>
67
This is a simple API for storing passwords and retrieving passwords in the keyring.
70
Each password is associated with a set of attributes. Attribute values can be either
71
strings or unsigned integers.
73
The names and types of allowed attributes for a given password are defined with a
74
schema. Certain schemas are predefined such as <link linkend="GNOME-KEYRING-NETWORK-PASSWORD--CAPS"><literal>GNOME_KEYRING_NETWORK_PASSWORD</literal></link>.
75
Additional schemas can be defined via the <link linkend="GnomeKeyringPasswordSchema"><literal>GnomeKeyringPasswordSchema</literal></link> structure.
78
Each function accepts a variable list of attributes names and their values.
79
Include a <link linkend="NULL--CAPS"><literal>NULL</literal></link> to terminate the list of attributes.
83
<title>Passing attributes to the functions</title>
85
res = gnome_keyring_delete_password_sync (GNOME_KEYRING_NETWORK_PASSWORD,
86
"user", "me", // A string attribute
87
"server, "example.gnome.org",
88
"port", "8080", // An integer attribute
90
</programlisting></example></para>
95
<refsect1 id="gnome-keyring-gnome-keyring-password.details" role="details">
96
<title role="details.title">Details</title>
97
<refsect2 id="GnomeKeyringPasswordSchema" role="struct">
98
<title>GnomeKeyringPasswordSchema</title>
99
<indexterm zone="GnomeKeyringPasswordSchema"><primary sortas="GnomeKeyringPasswordSchema">GnomeKeyringPasswordSchema</primary></indexterm><programlisting>typedef struct {
100
GnomeKeyringItemType item_type;
103
GnomeKeyringAttributeType type;
105
} GnomeKeyringPasswordSchema;
108
Describes a password schema. Often you'll want to use a predefined schema such
109
as <link linkend="GNOME-KEYRING-NETWORK-PASSWORD--CAPS"><literal>GNOME_KEYRING_NETWORK_PASSWORD</literal></link>.
113
The last attribute name in a schema must be <link linkend="NULL--CAPS"><literal>NULL</literal></link>.
117
GnomeKeyringPasswordSchema my_schema = {
118
GNOME_KEYRING_ITEM_GENERIC_SECRET,
120
{ "string-attr", GNOME_KEYRING_ATTRIBUTE_TYPE_STRING },
121
{ "uint-attr", GNOME_KEYRING_ATTRIBUTE_TYPE_UINT32 },
129
<refsect2 id="GNOME-KEYRING-NETWORK-PASSWORD--CAPS" role="variable">
130
<title>GNOME_KEYRING_NETWORK_PASSWORD</title>
131
<indexterm zone="GNOME-KEYRING-NETWORK-PASSWORD--CAPS"><primary sortas="GNOME_KEYRING_NETWORK_PASSWORD">GNOME_KEYRING_NETWORK_PASSWORD</primary></indexterm><programlisting>extern const GnomeKeyringPasswordSchema* GNOME_KEYRING_NETWORK_PASSWORD;
135
A predefined schema for network paswsords. It contains the following attributes:
138
<listitem>user: A string for the user login.</listitem>
139
<listitem>server: The server being connected to.</listitem>
140
<listitem>protocol: The protocol used to access the server, such as 'http' or 'smb'</listitem>
141
<listitem>domain: A realm or domain, such as a Windows login domain.</listitem>
142
<listitem>port: The network port to used to connect to the server.</listitem>
143
</itemizedlist></para>
146
<refsect2 id="GNOME-KEYRING-DEFAULT--CAPS" role="macro">
147
<title>GNOME_KEYRING_DEFAULT</title>
148
<indexterm zone="GNOME-KEYRING-DEFAULT--CAPS"><primary sortas="GNOME_KEYRING_DEFAULT">GNOME_KEYRING_DEFAULT</primary></indexterm><programlisting>#define GNOME_KEYRING_DEFAULT NULL
156
<refsect2 id="GNOME-KEYRING-SESSION--CAPS" role="macro">
157
<title>GNOME_KEYRING_SESSION</title>
158
<indexterm zone="GNOME-KEYRING-SESSION--CAPS"><primary sortas="GNOME_KEYRING_SESSION">GNOME_KEYRING_SESSION</primary></indexterm><programlisting>#define GNOME_KEYRING_SESSION "session"
162
A keyring only stored in memory.
166
<refsect2 id="gnome-keyring-store-password" role="function" condition="since:2.22">
167
<title>gnome_keyring_store_password ()</title>
168
<indexterm zone="gnome-keyring-store-password" role="2.22"><primary sortas="gnome_keyring_store_password">gnome_keyring_store_password</primary></indexterm><programlisting><link linkend="gpointer">gpointer</link> gnome_keyring_store_password (const <link linkend="GnomeKeyringPasswordSchema">GnomeKeyringPasswordSchema</link> *schema,
169
const <link linkend="gchar">gchar</link> *keyring,
170
const <link linkend="gchar">gchar</link> *display_name,
171
const <link linkend="gchar">gchar</link> *password,
172
<link linkend="GnomeKeyringOperationDoneCallback">GnomeKeyringOperationDoneCallback</link> callback,
173
<link linkend="gpointer">gpointer</link> data,
174
<link linkend="GDestroyNotify">GDestroyNotify</link> destroy_data,
175
...);</programlisting>
177
Store a password associated with a given set of attributes.
180
Attributes which identify this password must be passed as additional
181
arguments. Attributes passed must be defined in the schema.
184
If a password exists in the keyring that already has all the same arguments,
185
then the password will be updated.
188
Another more complex way to create a keyring item is using <link linkend="gnome-keyring-item-create"><function>gnome_keyring_item_create()</function></link>.</para>
190
</para><variablelist role="params">
191
<varlistentry><term><parameter>schema</parameter> :</term>
192
<listitem><simpara> The password schema.
193
</simpara></listitem></varlistentry>
194
<varlistentry><term><parameter>keyring</parameter> :</term>
195
<listitem><simpara> The keyring to store the password in. Specify <link linkend="NULL--CAPS"><literal>NULL</literal></link> for the default keyring.
196
Use <link linkend="GNOME-KEYRING-SESSION--CAPS"><literal>GNOME_KEYRING_SESSION</literal></link> to store the password in memory only.
197
</simpara></listitem></varlistentry>
198
<varlistentry><term><parameter>display_name</parameter> :</term>
199
<listitem><simpara> A human readable description of what the password is for.
200
</simpara></listitem></varlistentry>
201
<varlistentry><term><parameter>password</parameter> :</term>
202
<listitem><simpara> The password to store.
203
</simpara></listitem></varlistentry>
204
<varlistentry><term><parameter>callback</parameter> :</term>
205
<listitem><simpara> A callback which will be called when the request completes or fails.
206
</simpara></listitem></varlistentry>
207
<varlistentry><term><parameter>data</parameter> :</term>
208
<listitem><simpara> A pointer to arbitrary data that will be passed to the <parameter>callback</parameter>.
209
</simpara></listitem></varlistentry>
210
<varlistentry><term><parameter>destroy_data</parameter> :</term>
211
<listitem><simpara> A function to free <parameter>data</parameter> when it's no longer needed.
212
</simpara></listitem></varlistentry>
213
<varlistentry><term><parameter>...</parameter> :</term>
214
<listitem><simpara> The variable argument list should contain pairs of a) The attribute name as a null
215
terminated string, followed by b) attribute value, either a character string,
216
or 32-bit unsigned int, as defined in the password <parameter>schema</parameter>. The list of attribtues
217
should be terminated with a <link linkend="NULL--CAPS"><literal>NULL</literal></link>.
218
</simpara></listitem></varlistentry>
219
<varlistentry><term><emphasis>Returns</emphasis> :</term><listitem><simpara> The asychronous request, which can be passed to <link linkend="gnome-keyring-cancel-request"><function>gnome_keyring_cancel_request()</function></link>.
220
</simpara></listitem></varlistentry>
221
</variablelist><para role="since">Since 2.22</para></refsect2>
222
<refsect2 id="gnome-keyring-store-password-sync" role="function" condition="since:2.22">
223
<title>gnome_keyring_store_password_sync ()</title>
224
<indexterm zone="gnome-keyring-store-password-sync" role="2.22"><primary sortas="gnome_keyring_store_password_sync">gnome_keyring_store_password_sync</primary></indexterm><programlisting><link linkend="GnomeKeyringResult">GnomeKeyringResult</link> gnome_keyring_store_password_sync (const <link linkend="GnomeKeyringPasswordSchema">GnomeKeyringPasswordSchema</link> *schema,
225
const <link linkend="gchar">gchar</link> *keyring,
226
const <link linkend="gchar">gchar</link> *display_name,
227
const <link linkend="gchar">gchar</link> *password,
228
...);</programlisting>
230
Store a password associated with a given set of attributes.
233
Attributes which identify this password must be passed as additional
234
arguments. Attributes passed must be defined in the schema.
237
This function may block for an unspecified period. If your application must
238
remain responsive to the user, then use <link linkend="gnome-keyring-store-password"><function>gnome_keyring_store_password()</function></link>.
241
If a password exists in the keyring that already has all the same arguments,
242
then the password will be updated.
245
Another more complex way to create a keyring item is using
246
<link linkend="gnome-keyring-item-create-sync"><function>gnome_keyring_item_create_sync()</function></link>.</para>
248
</para><variablelist role="params">
249
<varlistentry><term><parameter>schema</parameter> :</term>
250
<listitem><simpara> The password schema.
251
</simpara></listitem></varlistentry>
252
<varlistentry><term><parameter>keyring</parameter> :</term>
253
<listitem><simpara> The keyring to store the password in. Specify <link linkend="NULL--CAPS"><literal>NULL</literal></link> for the default keyring.
254
Use <link linkend="GNOME-KEYRING-SESSION--CAPS"><literal>GNOME_KEYRING_SESSION</literal></link> to store the password in memory only.
255
</simpara></listitem></varlistentry>
256
<varlistentry><term><parameter>display_name</parameter> :</term>
257
<listitem><simpara> A human readable description of what the password is for.
258
</simpara></listitem></varlistentry>
259
<varlistentry><term><parameter>password</parameter> :</term>
260
<listitem><simpara> The password to store.
261
</simpara></listitem></varlistentry>
262
<varlistentry><term><parameter>...</parameter> :</term>
263
<listitem><simpara> The variable argument list should contain pairs of a) The attribute name as a null
264
terminated string, followed by b) attribute value, either a character string,
265
or 32-bit unsigned int, as defined in the password <parameter>schema</parameter>. The list of attribtues
266
should be terminated with a <link linkend="NULL--CAPS"><literal>NULL</literal></link>.
267
</simpara></listitem></varlistentry>
268
<varlistentry><term><emphasis>Returns</emphasis> :</term><listitem><simpara> <link linkend="GNOME-KEYRING-RESULT-OK--CAPS"><literal>GNOME_KEYRING_RESULT_OK</literal></link> if the operation was succcessful or
269
an error result otherwise.
270
</simpara></listitem></varlistentry>
271
</variablelist><para role="since">Since 2.22</para></refsect2>
272
<refsect2 id="gnome-keyring-find-password" role="function" condition="since:2.22">
273
<title>gnome_keyring_find_password ()</title>
274
<indexterm zone="gnome-keyring-find-password" role="2.22"><primary sortas="gnome_keyring_find_password">gnome_keyring_find_password</primary></indexterm><programlisting><link linkend="gpointer">gpointer</link> gnome_keyring_find_password (const <link linkend="GnomeKeyringPasswordSchema">GnomeKeyringPasswordSchema</link> *schema,
275
<link linkend="GnomeKeyringOperationGetStringCallback">GnomeKeyringOperationGetStringCallback</link> callback,
276
<link linkend="gpointer">gpointer</link> data,
277
<link linkend="GDestroyNotify">GDestroyNotify</link> destroy_data,
278
...);</programlisting>
280
Find a password that matches a given set of attributes.
283
Attributes which identify this password must be passed as additional
284
arguments. Attributes passed must be defined in the schema.
287
The string that is passed to <parameter>callback</parameter> is automatically freed when the
291
Another more complex way to find items in the keyrings is using
292
<link linkend="gnome-keyring-find-items"><function>gnome_keyring_find_items()</function></link>.</para>
294
</para><variablelist role="params">
295
<varlistentry><term><parameter>schema</parameter> :</term>
296
<listitem><simpara> The password schema.
297
</simpara></listitem></varlistentry>
298
<varlistentry><term><parameter>callback</parameter> :</term>
299
<listitem><simpara> A callback which will be called when the request completes or fails.
300
</simpara></listitem></varlistentry>
301
<varlistentry><term><parameter>data</parameter> :</term>
302
<listitem><simpara> A pointer to arbitrary data that will be passed to the <parameter>callback</parameter>.
303
</simpara></listitem></varlistentry>
304
<varlistentry><term><parameter>destroy_data</parameter> :</term>
305
<listitem><simpara> A function to free <parameter>data</parameter> when it's no longer needed.
306
</simpara></listitem></varlistentry>
307
<varlistentry><term><parameter>...</parameter> :</term>
308
<listitem><simpara> The variable argument list should contain pairs of a) The attribute name as a null
309
terminated string, followed by b) attribute value, either a character string,
310
or 32-bit unsigned int, as defined in the password <parameter>schema</parameter>. The list of attribtues
311
should be terminated with a <link linkend="NULL--CAPS"><literal>NULL</literal></link>.
312
</simpara></listitem></varlistentry>
313
<varlistentry><term><emphasis>Returns</emphasis> :</term><listitem><simpara> The asychronous request, which can be passed to <link linkend="gnome-keyring-cancel-request"><function>gnome_keyring_cancel_request()</function></link>.
314
</simpara></listitem></varlistentry>
315
</variablelist><para role="since">Since 2.22</para></refsect2>
316
<refsect2 id="gnome-keyring-find-password-sync" role="function" condition="since:2.22">
317
<title>gnome_keyring_find_password_sync ()</title>
318
<indexterm zone="gnome-keyring-find-password-sync" role="2.22"><primary sortas="gnome_keyring_find_password_sync">gnome_keyring_find_password_sync</primary></indexterm><programlisting><link linkend="GnomeKeyringResult">GnomeKeyringResult</link> gnome_keyring_find_password_sync (const <link linkend="GnomeKeyringPasswordSchema">GnomeKeyringPasswordSchema</link> *schema,
319
<link linkend="gchar">gchar</link> **password,
320
...);</programlisting>
322
Find a password that matches a given set of attributes.
325
Attributes which identify this password must be passed as additional
326
arguments. Attributes passed must be defined in the schema.
329
This function may block for an unspecified period. If your application must
330
remain responsive to the user, then use <link linkend="gnome-keyring-find-password"><function>gnome_keyring_find_password()</function></link>.
333
Another more complex way to find items in the keyrings is using
334
<link linkend="gnome-keyring-find-items-sync"><function>gnome_keyring_find_items_sync()</function></link>.</para>
336
</para><variablelist role="params">
337
<varlistentry><term><parameter>schema</parameter> :</term>
338
<listitem><simpara> The password schema.
339
</simpara></listitem></varlistentry>
340
<varlistentry><term><parameter>password</parameter> :</term>
341
<listitem><simpara> An address to store password that was found. The password must
342
be freed with <link linkend="gnome-keyring-free-password"><function>gnome_keyring_free_password()</function></link>.
343
</simpara></listitem></varlistentry>
344
<varlistentry><term><parameter>...</parameter> :</term>
345
<listitem><simpara> The variable argument list should contain pairs of a) The attribute name as a null
346
terminated string, followed by b) attribute value, either a character string,
347
or 32-bit unsigned int, as defined in the password <parameter>schema</parameter>. The list of attribtues
348
should be terminated with a <link linkend="NULL--CAPS"><literal>NULL</literal></link>.
349
</simpara></listitem></varlistentry>
350
<varlistentry><term><emphasis>Returns</emphasis> :</term><listitem><simpara> <link linkend="GNOME-KEYRING-RESULT-OK--CAPS"><literal>GNOME_KEYRING_RESULT_OK</literal></link> if the operation was succcessful or
351
an error result otherwise.
352
</simpara></listitem></varlistentry>
353
</variablelist><para role="since">Since 2.22</para></refsect2>
354
<refsect2 id="gnome-keyring-delete-password" role="function" condition="since:2.22">
355
<title>gnome_keyring_delete_password ()</title>
356
<indexterm zone="gnome-keyring-delete-password" role="2.22"><primary sortas="gnome_keyring_delete_password">gnome_keyring_delete_password</primary></indexterm><programlisting><link linkend="gpointer">gpointer</link> gnome_keyring_delete_password (const <link linkend="GnomeKeyringPasswordSchema">GnomeKeyringPasswordSchema</link> *schema,
357
<link linkend="GnomeKeyringOperationDoneCallback">GnomeKeyringOperationDoneCallback</link> callback,
358
<link linkend="gpointer">gpointer</link> data,
359
<link linkend="GDestroyNotify">GDestroyNotify</link> destroy_data,
360
...);</programlisting>
362
Delete a password that matches a given set of attributes.
365
Attributes which identify this password must be passed as additional
366
arguments. Attributes passed must be defined in the schema.
369
Another more complex way to find items in the keyrings is using
370
<link linkend="gnome-keyring-item-delete"><function>gnome_keyring_item_delete()</function></link>.</para>
372
</para><variablelist role="params">
373
<varlistentry><term><parameter>schema</parameter> :</term>
374
<listitem><simpara> The password schema.
375
</simpara></listitem></varlistentry>
376
<varlistentry><term><parameter>callback</parameter> :</term>
377
<listitem><simpara> A callback which will be called when the request completes or fails.
378
</simpara></listitem></varlistentry>
379
<varlistentry><term><parameter>data</parameter> :</term>
380
<listitem><simpara> A pointer to arbitrary data that will be passed to the <parameter>callback</parameter>.
381
</simpara></listitem></varlistentry>
382
<varlistentry><term><parameter>destroy_data</parameter> :</term>
383
<listitem><simpara> A function to free <parameter>data</parameter> when it's no longer needed.
384
</simpara></listitem></varlistentry>
385
<varlistentry><term><parameter>...</parameter> :</term>
386
<listitem><simpara> The variable argument list should contain pairs of a) The attribute name as a null
387
terminated string, followed by b) attribute value, either a character string,
388
or 32-bit unsigned int, as defined in the password <parameter>schema</parameter>. The list of attribtues
389
should be terminated with a <link linkend="NULL--CAPS"><literal>NULL</literal></link>.
390
</simpara></listitem></varlistentry>
391
<varlistentry><term><emphasis>Returns</emphasis> :</term><listitem><simpara> The asychronous request, which can be passed to <link linkend="gnome-keyring-cancel-request"><function>gnome_keyring_cancel_request()</function></link>.
392
</simpara></listitem></varlistentry>
393
</variablelist><para role="since">Since 2.22</para></refsect2>
394
<refsect2 id="gnome-keyring-delete-password-sync" role="function" condition="since:2.22">
395
<title>gnome_keyring_delete_password_sync ()</title>
396
<indexterm zone="gnome-keyring-delete-password-sync" role="2.22"><primary sortas="gnome_keyring_delete_password_sync">gnome_keyring_delete_password_sync</primary></indexterm><programlisting><link linkend="GnomeKeyringResult">GnomeKeyringResult</link> gnome_keyring_delete_password_sync (const <link linkend="GnomeKeyringPasswordSchema">GnomeKeyringPasswordSchema</link> *schema,
397
...);</programlisting>
399
Delete a password that matches a given set of attributes.
402
Attributes which identify this password must be passed as additional
403
arguments. Attributes passed must be defined in the schema.
406
This function may block for an unspecified period. If your application must
407
remain responsive to the user, then use <link linkend="gnome-keyring-delete-password"><function>gnome_keyring_delete_password()</function></link>.
410
Another more complex way to find items in the keyrings is using
411
<link linkend="gnome-keyring-item-delete-sync"><function>gnome_keyring_item_delete_sync()</function></link>.</para>
413
</para><variablelist role="params">
414
<varlistentry><term><parameter>schema</parameter> :</term>
415
<listitem><simpara> The password schema.
416
</simpara></listitem></varlistentry>
417
<varlistentry><term><parameter>...</parameter> :</term>
418
<listitem><simpara> The variable argument list should contain pairs of a) The attribute name as a null
419
terminated string, followed by b) attribute value, either a character string,
420
or 32-bit unsigned int, as defined in the password <parameter>schema</parameter>. The list of attribtues
421
should be terminated with a <link linkend="NULL--CAPS"><literal>NULL</literal></link>.
422
</simpara></listitem></varlistentry>
423
<varlistentry><term><emphasis>Returns</emphasis> :</term><listitem><simpara> <link linkend="GNOME-KEYRING-RESULT-OK--CAPS"><literal>GNOME_KEYRING_RESULT_OK</literal></link> if the operation was succcessful or
424
an error result otherwise.
425
</simpara></listitem></varlistentry>
426
</variablelist><para role="since">Since 2.22</para></refsect2>
427
<refsect2 id="gnome-keyring-free-password" role="function">
428
<title>gnome_keyring_free_password ()</title>
429
<indexterm zone="gnome-keyring-free-password"><primary sortas="gnome_keyring_free_password">gnome_keyring_free_password</primary></indexterm><programlisting><link linkend="void">void</link> gnome_keyring_free_password (<link linkend="gchar">gchar</link> *password);</programlisting>
431
Clears the memory used by password by filling with '\0' and frees the memory
432
after doing this. You should use this function instead of <link linkend="g-free"><function>g_free()</function></link> for
433
secret information.</para>
435
</para><variablelist role="params">
436
<varlistentry><term><parameter>password</parameter> :</term>
437
<listitem><simpara> the password to be freed
438
</simpara></listitem></varlistentry>
439
</variablelist></refsect2>