View on GitHub

Vistle

Distributed Data-parallel Scientific Visualization in VR

Functions | Variables
vistle::crypto Namespace Reference

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
 

Function Documentation

◆ compute_mac()

V_UTILEXPORT std::vector< uint8_t > vistle::crypto::compute_mac ( const void *  data,
size_t  length,
const std::vector< uint8_t > &  key 
)

◆ from_secure()

template<typename C , class Container >
static std::vector< C > vistle::crypto::from_secure ( const Container &  secure)
static

◆ get_session_key()

V_UTILEXPORT std::string vistle::crypto::get_session_key ( )

◆ initialize()

V_UTILEXPORT bool vistle::crypto::initialize ( size_t  secret_size)

◆ random_data()

V_UTILEXPORT std::vector< uint8_t > vistle::crypto::random_data ( size_t  length)

◆ session_data()

V_UTILEXPORT const std::vector< uint8_t > & vistle::crypto::session_data ( )

◆ session_key()

V_UTILEXPORT const std::vector< uint8_t > & vistle::crypto::session_key ( )

◆ set_session_key()

V_UTILEXPORT bool vistle::crypto::set_session_key ( const std::string &  hex_key)

◆ verify_mac()

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 
)

Variable Documentation

◆ mac_algorithm

const char vistle::crypto::mac_algorithm[] = "HMAC(SHA-256)"
static

◆ s_botan_lib

std::unique_ptr<Botan::LibraryInitializer> vistle::crypto::s_botan_lib
static

◆ s_initialized

bool vistle::crypto::s_initialized = false
static

◆ s_key

std::vector<uint8_t> vistle::crypto::s_key
static

◆ s_mutex

std::recursive_mutex vistle::crypto::s_mutex
static

◆ s_session_data

std::vector<uint8_t> vistle::crypto::s_session_data
static

◆ s_temp_key

std::string vistle::crypto::s_temp_key
static