mirror of
https://gitlab.gnome.org/GNOME/libsecret.git
synced 2024-12-22 04:38:55 +00:00
Add secret_password_clear() function
* Useful for clearing passwords in memory
This commit is contained in:
parent
dd83ac0db3
commit
de403fd927
@ -109,8 +109,8 @@ secret_password_removev
|
||||
secret_password_remove_finish
|
||||
secret_password_remove_sync
|
||||
secret_password_removev_sync
|
||||
secret_password_clear
|
||||
secret_password_free
|
||||
|
||||
</SECTION>
|
||||
|
||||
<SECTION>
|
||||
|
@ -1125,3 +1125,18 @@ secret_password_free (gchar *password)
|
||||
|
||||
egg_secure_strfree (password);
|
||||
}
|
||||
|
||||
/**
|
||||
* secret_password_clear:
|
||||
* @password: (allow-none): password to clear
|
||||
*
|
||||
* Clear the memory used by a password.
|
||||
*/
|
||||
void
|
||||
secret_password_clear (gchar *password)
|
||||
{
|
||||
if (password == NULL)
|
||||
return;
|
||||
|
||||
egg_secure_strclear (password);
|
||||
}
|
||||
|
@ -126,6 +126,8 @@ gboolean secret_password_removev_sync (const SecretSchema *sche
|
||||
|
||||
void secret_password_free (gchar *password);
|
||||
|
||||
void secret_password_clear (gchar *password);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __SECRET_PASSWORD_H___ */
|
||||
|
Loading…
Reference in New Issue
Block a user