Functions | |
template<typename C , class Container > | |
static std::vector< C > | from_secure (const Container &secure) |
bool | initialize (size_t secret_size) |
bool | set_session_key (const std::string &hex_key) |
std::string | get_session_key () |
std::vector< uint8_t > | random_data (size_t length) |
std::vector< uint8_t > | compute_mac (const void *data, size_t length, const std::vector< uint8_t > &key) |
bool | verify_mac (const void *data, size_t length, const std::vector< uint8_t > &key, const std::vector< uint8_t > &mac) |
const std::vector< uint8_t > & | session_data () |
const std::vector< uint8_t > & | session_key () |
Variables | |
static std::recursive_mutex | s_mutex |
static bool | s_initialized = false |
static std::unique_ptr< Botan::LibraryInitializer > | s_botan_lib |
static std::vector< uint8_t > | s_key |
static std::vector< uint8_t > | s_session_data |
static const char | mac_algorithm [] = "HMAC(SHA-256)" |
static std::string | s_temp_key |
V_UTILEXPORT std::vector< uint8_t > vistle::crypto::compute_mac | ( | const void * | data, |
size_t | length, | ||
const std::vector< uint8_t > & | key | ||
) |
|
static |
V_UTILEXPORT std::string vistle::crypto::get_session_key | ( | ) |
V_UTILEXPORT bool vistle::crypto::initialize | ( | size_t | secret_size | ) |
V_UTILEXPORT std::vector< uint8_t > vistle::crypto::random_data | ( | size_t | length | ) |
V_UTILEXPORT const std::vector< uint8_t > & vistle::crypto::session_data | ( | ) |
V_UTILEXPORT const std::vector< uint8_t > & vistle::crypto::session_key | ( | ) |
V_UTILEXPORT bool vistle::crypto::set_session_key | ( | const std::string & | hex_key | ) |
V_UTILEXPORT bool vistle::crypto::verify_mac | ( | const void * | data, |
size_t | length, | ||
const std::vector< uint8_t > & | key, | ||
const std::vector< uint8_t > & | mac | ||
) |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |