From 1bb2a9d33e8cd193c21f9995fb7852c7562cafcf Mon Sep 17 00:00:00 2001 From: Simeon Simeonov Date: Tue, 27 Feb 2018 21:52:12 +0100 Subject: First prototype --- libsylph/ssl.h | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'libsylph/ssl.h') diff --git a/libsylph/ssl.h b/libsylph/ssl.h index a9f690d..94ab4b7 100644 --- a/libsylph/ssl.h +++ b/libsylph/ssl.h @@ -32,9 +32,15 @@ #include #include #include +#include +#include #include "socket.h" +#define RC_OK 0 +#define RC_ERROR -1 +#define RC_WRONG_HASH_OR_KEY 1 + typedef enum { SSL_METHOD_SSLv23, SSL_METHOD_TLSv1 @@ -60,6 +66,20 @@ void ssl_done_socket (SockInfo *sockinfo); 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 decrypt_data(gchar **decrypted, + const gchar *data, + const gchar *passphrase, + gint length_data); +/* ---------------------------- */ #endif /* USE_SSL */ #endif /* __SSL_H__ */ -- cgit v1.3