OpenVPN 3 Core Library
Loading...
Searching...
No Matches
openvpn::OpenVPNStaticKey Class Reference

#include <static_key.hpp>

Collaboration diagram for openvpn::OpenVPNStaticKey:
[legend]

Public Types

enum  { KEY_SIZE = 256 }
 
enum  {
  CIPHER = 0 , HMAC = (1 << 0) , ENCRYPT = 0 , DECRYPT = (1 << 1) ,
  NORMAL = 0 , INVERSE = (1 << 2)
}
 

Public Member Functions

 OPENVPN_SIMPLE_EXCEPTION (static_key_parse_error)
 
 OPENVPN_SIMPLE_EXCEPTION (static_key_bad_size)
 
bool defined () const
 
void XOR (const OpenVPNStaticKey &other)
 
StaticKey slice (unsigned int key_specifier) const
 
void parse_from_file (const std::string &filename)
 
void parse (const std::string &key_text)
 
std::string render () const
 
unsigned char * raw_alloc ()
 
void erase ()
 

Private Types

typedef StaticKey::key_t key_t
 

Static Private Member Functions

static const char * static_key_head ()
 
static const char * static_key_foot ()
 

Private Attributes

key_t key_data_
 

Detailed Description

Definition at line 90 of file static_key.hpp.

Member Typedef Documentation

◆ key_t

Definition at line 92 of file static_key.hpp.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
Enumerator
KEY_SIZE 

Definition at line 95 of file static_key.hpp.

◆ anonymous enum

anonymous enum
Enumerator
CIPHER 
HMAC 
ENCRYPT 
DECRYPT 
NORMAL 
INVERSE 

Definition at line 101 of file static_key.hpp.

Member Function Documentation

◆ defined()

bool openvpn::OpenVPNStaticKey::defined ( ) const
inline

Definition at line 119 of file static_key.hpp.

Here is the caller graph for this function:

◆ erase()

void openvpn::OpenVPNStaticKey::erase ( )
inline

Definition at line 185 of file static_key.hpp.

◆ OPENVPN_SIMPLE_EXCEPTION() [1/2]

openvpn::OpenVPNStaticKey::OPENVPN_SIMPLE_EXCEPTION ( static_key_bad_size  )

◆ OPENVPN_SIMPLE_EXCEPTION() [2/2]

openvpn::OpenVPNStaticKey::OPENVPN_SIMPLE_EXCEPTION ( static_key_parse_error  )

◆ parse()

void openvpn::OpenVPNStaticKey::parse ( const std::string &  key_text)
inline

Definition at line 147 of file static_key.hpp.

Here is the caller graph for this function:

◆ parse_from_file()

void openvpn::OpenVPNStaticKey::parse_from_file ( const std::string &  filename)
inline

Definition at line 141 of file static_key.hpp.

◆ raw_alloc()

unsigned char * openvpn::OpenVPNStaticKey::raw_alloc ( )
inline

Definition at line 179 of file static_key.hpp.

Here is the caller graph for this function:

◆ render()

std::string openvpn::OpenVPNStaticKey::render ( ) const
inline

Definition at line 167 of file static_key.hpp.

Here is the caller graph for this function:

◆ slice()

StaticKey openvpn::OpenVPNStaticKey::slice ( unsigned int  key_specifier) const
inline

Definition at line 132 of file static_key.hpp.

Here is the caller graph for this function:

◆ static_key_foot()

static const char * openvpn::OpenVPNStaticKey::static_key_foot ( )
inlinestaticprivate

Definition at line 196 of file static_key.hpp.

Here is the caller graph for this function:

◆ static_key_head()

static const char * openvpn::OpenVPNStaticKey::static_key_head ( )
inlinestaticprivate

Definition at line 191 of file static_key.hpp.

Here is the caller graph for this function:

◆ XOR()

void openvpn::OpenVPNStaticKey::XOR ( const OpenVPNStaticKey other)
inline

Definition at line 124 of file static_key.hpp.

Here is the caller graph for this function:

Member Data Documentation

◆ key_data_

key_t openvpn::OpenVPNStaticKey::key_data_
private

Definition at line 201 of file static_key.hpp.


The documentation for this class was generated from the following file: