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

#include <cipher.hpp>

Inheritance diagram for openvpn::MbedTLSCrypto::CipherContextCommon:
[legend]

Public Types

enum  { MODE_UNDEF = MBEDTLS_OPERATION_NONE , ENCRYPT = MBEDTLS_ENCRYPT , DECRYPT = MBEDTLS_DECRYPT }
 

Public Member Functions

 OPENVPN_SIMPLE_EXCEPTION (mbedtls_cipher_mode_error)
 
 OPENVPN_SIMPLE_EXCEPTION (mbedtls_cipher_uninitialized)
 
bool constexpr requires_authtag_at_end ()
 

Protected Member Functions

 CipherContextCommon ()=default
 
virtual ~CipherContextCommon ()
 
 CipherContextCommon (const CipherContextCommon &other)=delete
 
CipherContextCommonoperator= (const CipherContextCommon &other)=delete
 
 CipherContextCommon (CipherContextCommon &&other) noexcept
 
CipherContextCommonoperator= (CipherContextCommon &&other)
 
void erase ()
 
void check_initialized () const
 

Static Protected Member Functions

static void check_mode (int mode)
 

Protected Attributes

bool initialized = false
 
mbedtls_cipher_context_t ctx
 

Detailed Description

Definition at line 28 of file cipher.hpp.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
Enumerator
MODE_UNDEF 
ENCRYPT 
DECRYPT 

Definition at line 35 of file cipher.hpp.

Constructor & Destructor Documentation

◆ CipherContextCommon() [1/3]

openvpn::MbedTLSCrypto::CipherContextCommon::CipherContextCommon ( )
protecteddefault

◆ ~CipherContextCommon()

virtual openvpn::MbedTLSCrypto::CipherContextCommon::~CipherContextCommon ( )
inlineprotectedvirtual

Definition at line 55 of file cipher.hpp.

◆ CipherContextCommon() [2/3]

openvpn::MbedTLSCrypto::CipherContextCommon::CipherContextCommon ( const CipherContextCommon other)
protecteddelete

◆ CipherContextCommon() [3/3]

openvpn::MbedTLSCrypto::CipherContextCommon::CipherContextCommon ( CipherContextCommon &&  other)
inlineprotectednoexcept

Definition at line 64 of file cipher.hpp.

Member Function Documentation

◆ check_initialized()

void openvpn::MbedTLSCrypto::CipherContextCommon::check_initialized ( ) const
inlineprotected

Definition at line 97 of file cipher.hpp.

Here is the caller graph for this function:

◆ check_mode()

static void openvpn::MbedTLSCrypto::CipherContextCommon::check_mode ( int  mode)
inlinestaticprotected

Definition at line 81 of file cipher.hpp.

Here is the caller graph for this function:

◆ erase()

void openvpn::MbedTLSCrypto::CipherContextCommon::erase ( )
inlineprotected

Definition at line 88 of file cipher.hpp.

Here is the caller graph for this function:

◆ OPENVPN_SIMPLE_EXCEPTION() [1/2]

openvpn::MbedTLSCrypto::CipherContextCommon::OPENVPN_SIMPLE_EXCEPTION ( mbedtls_cipher_mode_error  )

◆ OPENVPN_SIMPLE_EXCEPTION() [2/2]

openvpn::MbedTLSCrypto::CipherContextCommon::OPENVPN_SIMPLE_EXCEPTION ( mbedtls_cipher_uninitialized  )

◆ operator=() [1/2]

CipherContextCommon & openvpn::MbedTLSCrypto::CipherContextCommon::operator= ( CipherContextCommon &&  other)
inlineprotected

Definition at line 72 of file cipher.hpp.

◆ operator=() [2/2]

CipherContextCommon & openvpn::MbedTLSCrypto::CipherContextCommon::operator= ( const CipherContextCommon other)
protecteddelete

◆ requires_authtag_at_end()

bool constexpr openvpn::MbedTLSCrypto::CipherContextCommon::requires_authtag_at_end ( )
inlineconstexpr

This crypto library requires the auth tag to be at the end for encryption and decryption

Returns

Definition at line 47 of file cipher.hpp.

Member Data Documentation

◆ ctx

mbedtls_cipher_context_t openvpn::MbedTLSCrypto::CipherContextCommon::ctx
protected

Definition at line 104 of file cipher.hpp.

◆ initialized

bool openvpn::MbedTLSCrypto::CipherContextCommon::initialized = false
protected

Definition at line 103 of file cipher.hpp.


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