OpenVPN 3 Core Library
Loading...
Searching...
No Matches
openvpn::OvpnHMAC< CRYPTO_API > Class Template Reference

#include <ovpnhmac.hpp>

Public Member Functions

 OPENVPN_SIMPLE_EXCEPTION (ovpn_hmac_context_digest_size)
 
 OPENVPN_SIMPLE_EXCEPTION (ovpn_hmac_context_bad_sizing)
 
 OvpnHMAC ()
 
 OvpnHMAC (const CryptoAlgs::Type digest, const StaticKey &key)
 
bool defined () const
 
size_t output_size () const
 
void init (const CryptoAlgs::Type digest, const StaticKey &key)
 
void hmac (unsigned char *out, const size_t out_size, const unsigned char *in, const size_t in_size)
 
void ovpn_hmac_gen (unsigned char *data, const size_t data_size, const size_t l1, const size_t l2, const size_t l3)
 
bool ovpn_hmac_cmp (const unsigned char *data, const size_t data_size, const size_t l1, const size_t l2, const size_t l3)
 

Private Member Functions

bool ovpn_hmac_pre (const unsigned char *data, const size_t data_size, const size_t l1, const size_t l2, const size_t l3)
 

Private Attributes

CRYPTO_API::HMACContext ctx
 

Detailed Description

template<typename CRYPTO_API>
class openvpn::OvpnHMAC< CRYPTO_API >

Definition at line 31 of file ovpnhmac.hpp.

Constructor & Destructor Documentation

◆ OvpnHMAC() [1/2]

template<typename CRYPTO_API >
openvpn::OvpnHMAC< CRYPTO_API >::OvpnHMAC ( )
inline

Definition at line 38 of file ovpnhmac.hpp.

◆ OvpnHMAC() [2/2]

template<typename CRYPTO_API >
openvpn::OvpnHMAC< CRYPTO_API >::OvpnHMAC ( const CryptoAlgs::Type  digest,
const StaticKey key 
)
inline

Definition at line 42 of file ovpnhmac.hpp.

Member Function Documentation

◆ defined()

template<typename CRYPTO_API >
bool openvpn::OvpnHMAC< CRYPTO_API >::defined ( ) const
inline

Definition at line 47 of file ovpnhmac.hpp.

◆ hmac()

template<typename CRYPTO_API >
void openvpn::OvpnHMAC< CRYPTO_API >::hmac ( unsigned char *  out,
const size_t  out_size,
const unsigned char *  in,
const size_t  in_size 
)
inline

Definition at line 70 of file ovpnhmac.hpp.

◆ init()

template<typename CRYPTO_API >
void openvpn::OvpnHMAC< CRYPTO_API >::init ( const CryptoAlgs::Type  digest,
const StaticKey key 
)
inline

Definition at line 58 of file ovpnhmac.hpp.

Here is the caller graph for this function:

◆ OPENVPN_SIMPLE_EXCEPTION() [1/2]

template<typename CRYPTO_API >
openvpn::OvpnHMAC< CRYPTO_API >::OPENVPN_SIMPLE_EXCEPTION ( ovpn_hmac_context_bad_sizing  )

◆ OPENVPN_SIMPLE_EXCEPTION() [2/2]

template<typename CRYPTO_API >
openvpn::OvpnHMAC< CRYPTO_API >::OPENVPN_SIMPLE_EXCEPTION ( ovpn_hmac_context_digest_size  )

◆ output_size()

template<typename CRYPTO_API >
size_t openvpn::OvpnHMAC< CRYPTO_API >::output_size ( ) const
inline

Definition at line 53 of file ovpnhmac.hpp.

◆ ovpn_hmac_cmp()

template<typename CRYPTO_API >
bool openvpn::OvpnHMAC< CRYPTO_API >::ovpn_hmac_cmp ( const unsigned char *  data,
const size_t  data_size,
const size_t  l1,
const size_t  l2,
const size_t  l3 
)
inline

Definition at line 95 of file ovpnhmac.hpp.

◆ ovpn_hmac_gen()

template<typename CRYPTO_API >
void openvpn::OvpnHMAC< CRYPTO_API >::ovpn_hmac_gen ( unsigned char *  data,
const size_t  data_size,
const size_t  l1,
const size_t  l2,
const size_t  l3 
)
inline

Definition at line 82 of file ovpnhmac.hpp.

◆ ovpn_hmac_pre()

template<typename CRYPTO_API >
bool openvpn::OvpnHMAC< CRYPTO_API >::ovpn_hmac_pre ( const unsigned char *  data,
const size_t  data_size,
const size_t  l1,
const size_t  l2,
const size_t  l3 
)
inlineprivate

Definition at line 118 of file ovpnhmac.hpp.

Here is the caller graph for this function:

Member Data Documentation

◆ ctx

template<typename CRYPTO_API >
CRYPTO_API::HMACContext openvpn::OvpnHMAC< CRYPTO_API >::ctx
private

Definition at line 134 of file ovpnhmac.hpp.


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