From 8c56039d67bd910a334b2ddd009c6df4bb01cc8b Mon Sep 17 00:00:00 2001 From: Simeon Simeonov Date: Tue, 6 Mar 2018 10:46:02 +0100 Subject: Add the core master-password functionality in libsylph/ssl.[c,h] --- libsylph/ssl.h | 24 +++++++++++++++--------- 1 file changed, 15 insertions(+), 9 deletions(-) (limited to 'libsylph/ssl.h') diff --git a/libsylph/ssl.h b/libsylph/ssl.h index 94ab4b7..6338911 100644 --- a/libsylph/ssl.h +++ b/libsylph/ssl.h @@ -68,17 +68,23 @@ void ssl_set_verify_func (SSLVerifyFunc func); /* master password related code */ gint encrypt_data(gchar **encrypted, - gint *length_encrypted, - const gchar *data, - const gchar *passphrase, - gint length_data, - guint min_data_length, - gboolean rnd_salt); + gint *length_encrypted, + const gchar *data, + const gchar *passphrase, + gint length_data, + guint min_data_length, + gboolean rnd_salt); gint decrypt_data(gchar **decrypted, - const gchar *data, - const gchar *passphrase, - gint length_data); + const gchar *data, + const gchar *passphrase, + gint length_data); + +gint generate_password_hash(gchar **password_hash, + const gchar *password, + const guchar *salt); + +gint check_password(const gchar *password, const gchar *password_hash); /* ---------------------------- */ #endif /* USE_SSL */ -- cgit v1.3