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

#include <hmac-compat.hpp>

Public Types

enum  { MAX_HMAC_SIZE = EVP_MAX_MD_SIZE }
 

Public Member Functions

 HMACContext (const HMACContext &)=delete
 
HMACContextoperator= (const HMACContext &)=delete
 
HMACContextoperator= (HMACContext &&rhs)
 
 OPENVPN_SIMPLE_EXCEPTION (openssl_hmac_uninitialized)
 
 OPENVPN_EXCEPTION (openssl_hmac_error)
 
 HMACContext ()=default
 
 HMACContext (const CryptoAlgs::Type digest, const unsigned char *key, const size_t key_size)
 
 ~HMACContext ()
 
void init (const CryptoAlgs::Type digest, const unsigned char *key, const size_t key_size)
 
void reset ()
 
void update (const unsigned char *in, const size_t size)
 
size_t final (unsigned char *out)
 
size_t size () const
 
bool is_initialized () const
 

Private Member Functions

void erase ()
 
size_t size_ () const
 
void check_initialized () const
 

Private Attributes

HMAC_CTX * ctx = nullptr
 

Detailed Description

Definition at line 27 of file hmac-compat.hpp.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
Enumerator
MAX_HMAC_SIZE 

Definition at line 44 of file hmac-compat.hpp.

Constructor & Destructor Documentation

◆ HMACContext() [1/3]

openvpn::OpenSSLCrypto::HMACContext::HMACContext ( const HMACContext )
delete

◆ HMACContext() [2/3]

openvpn::OpenSSLCrypto::HMACContext::HMACContext ( )
default

◆ HMACContext() [3/3]

openvpn::OpenSSLCrypto::HMACContext::HMACContext ( const CryptoAlgs::Type  digest,
const unsigned char *  key,
const size_t  key_size 
)
inline

Definition at line 51 of file hmac-compat.hpp.

◆ ~HMACContext()

openvpn::OpenSSLCrypto::HMACContext::~HMACContext ( )
inline

Definition at line 56 of file hmac-compat.hpp.

Member Function Documentation

◆ check_initialized()

void openvpn::OpenSSLCrypto::HMACContext::check_initialized ( ) const
inlineprivate

Definition at line 130 of file hmac-compat.hpp.

Here is the caller graph for this function:

◆ erase()

void openvpn::OpenSSLCrypto::HMACContext::erase ( )
inlineprivate

Definition at line 119 of file hmac-compat.hpp.

Here is the caller graph for this function:

◆ final()

size_t openvpn::OpenSSLCrypto::HMACContext::final ( unsigned char *  out)
inline

Definition at line 95 of file hmac-compat.hpp.

◆ init()

void openvpn::OpenSSLCrypto::HMACContext::init ( const CryptoAlgs::Type  digest,
const unsigned char *  key,
const size_t  key_size 
)
inline

Definition at line 61 of file hmac-compat.hpp.

Here is the caller graph for this function:

◆ is_initialized()

bool openvpn::OpenSSLCrypto::HMACContext::is_initialized ( ) const
inline

Definition at line 113 of file hmac-compat.hpp.

◆ OPENVPN_EXCEPTION()

openvpn::OpenSSLCrypto::HMACContext::OPENVPN_EXCEPTION ( openssl_hmac_error  )

◆ OPENVPN_SIMPLE_EXCEPTION()

openvpn::OpenSSLCrypto::HMACContext::OPENVPN_SIMPLE_EXCEPTION ( openssl_hmac_uninitialized  )

◆ operator=() [1/2]

HMACContext & openvpn::OpenSSLCrypto::HMACContext::operator= ( const HMACContext )
delete

◆ operator=() [2/2]

HMACContext & openvpn::OpenSSLCrypto::HMACContext::operator= ( HMACContext &&  rhs)
inline

Definition at line 33 of file hmac-compat.hpp.

◆ reset()

void openvpn::OpenSSLCrypto::HMACContext::reset ( )
inline

Definition at line 74 of file hmac-compat.hpp.

◆ size()

size_t openvpn::OpenSSLCrypto::HMACContext::size ( ) const
inline

Definition at line 107 of file hmac-compat.hpp.

Here is the caller graph for this function:

◆ size_()

size_t openvpn::OpenSSLCrypto::HMACContext::size_ ( ) const
inlineprivate

Definition at line 125 of file hmac-compat.hpp.

Here is the caller graph for this function:

◆ update()

void openvpn::OpenSSLCrypto::HMACContext::update ( const unsigned char *  in,
const size_t  size 
)
inline

Definition at line 84 of file hmac-compat.hpp.

Member Data Documentation

◆ ctx

HMAC_CTX* openvpn::OpenSSLCrypto::HMACContext::ctx = nullptr
private

Definition at line 138 of file hmac-compat.hpp.


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