#include "credentials.hpp"
#include "preferences/general.hpp"
#include "serialization/unicode.hpp"
#include "filesystem.hpp"
#include "log.hpp"
#include "serialization/string_utils.hpp"
#include <boost/algorithm/string.hpp>
#include <algorithm>
#include <memory>
#include <openssl/evp.h>
Go to the source code of this file.
Classes | |
class | secure_buffer |
struct | login_info |
Namespaces | |
preferences | |
Modify, read and display user preferences. | |
Macros | |
#define | DBG_CFG LOG_STREAM(debug , log_config) |
#define | ERR_CFG LOG_STREAM(err , log_config) |
Functions | |
static secure_buffer | encrypt (const secure_buffer &text, const secure_buffer &key) |
static secure_buffer | decrypt (const secure_buffer &text, const secure_buffer &key) |
static secure_buffer | build_key (const std::string &server, const std::string &login) |
static secure_buffer | escape (const secure_buffer &text) |
static secure_buffer | unescape (const secure_buffer &text) |
static std::string | get_system_username () |
static void | clear_credentials () |
std::string | preferences::login () |
void | preferences::set_login (const std::string &login) |
bool | preferences::remember_password () |
void | preferences::set_remember_password (bool remember) |
std::string | preferences::password (const std::string &server, const std::string &login) |
void | preferences::set_password (const std::string &server, const std::string &login, const std::string &key) |
void | preferences::load_credentials () |
void | preferences::save_credentials () |
static secure_buffer | rc4_crypt (const secure_buffer &text, const secure_buffer &key) |
Variables | |
static lg::log_domain | log_config ("config") |
static std::vector< login_info > | credentials |
static const unsigned char | CREDENTIAL_SEPARATOR = '\f' |
static const std::string | EMPTY_LOGIN = "@@" |
#define DBG_CFG LOG_STREAM(debug , log_config) |
Definition at line 40 of file credentials.cpp.
Referenced by preferences::password(), and preferences::set_password().
#define ERR_CFG LOG_STREAM(err , log_config) |
Definition at line 41 of file credentials.cpp.
Referenced by preferences::load_credentials(), preferences::login(), and preferences::save_credentials().
|
static |
Definition at line 257 of file credentials.cpp.
References get_system_username(), and i.
Referenced by preferences::load_credentials(), preferences::password(), preferences::save_credentials(), and preferences::set_password().
|
static |
Definition at line 101 of file credentials.cpp.
Referenced by preferences::load_credentials(), preferences::set_password(), and preferences::set_remember_password().
|
static |
Definition at line 309 of file credentials.cpp.
References rc4_crypt().
Referenced by preferences::load_credentials(), and preferences::password().
|
static |
Definition at line 304 of file credentials.cpp.
References rc4_crypt().
Referenced by preferences::save_credentials(), and preferences::set_password().
|
static |
Definition at line 343 of file credentials.cpp.
References c.
Referenced by preferences::save_credentials().
|
static |
Definition at line 82 of file credentials.cpp.
References preferences::login(), utf8::size(), and unicode_cast().
Referenced by build_key(), preferences::load_credentials(), preferences::login(), and preferences::save_credentials().
|
static |
Definition at line 269 of file credentials.cpp.
|
static |
Definition at line 318 of file credentials.cpp.
References c.
Referenced by preferences::load_credentials().
|
static |
Definition at line 74 of file credentials.cpp.
Referenced by preferences::load_credentials(), and preferences::save_credentials().
|
static |
Definition at line 71 of file credentials.cpp.
|
static |
Definition at line 112 of file credentials.cpp.
Referenced by preferences::login().
|
static |