OpenVPN 3 Core Library
Loading...
Searching...
No Matches
DigestContext Class Reference

#include <digest.hpp>

Collaboration diagram for DigestContext:
[legend]

Public Types

enum  { MAX_DIGEST_SIZE = CC_SHA512_DIGEST_LENGTH }
 

Public Member Functions

 OPENVPN_SIMPLE_EXCEPTION (apple_digest_uninitialized)
 
 OPENVPN_SIMPLE_EXCEPTION (apple_digest_final_overflow)
 
 OPENVPN_EXCEPTION (apple_digest_error)
 
 DigestContext ()
 
 DigestContext (const CryptoAlgs::Type alg)
 
void init (const CryptoAlgs::Type alg)
 
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

 DigestContext (const DigestContext &)=delete
 
DigestContextoperator= (const DigestContext &)=delete
 
void clear ()
 
void check_initialized () const
 

Static Private Member Functions

static const DigestInfodigest_type (const CryptoAlgs::Type alg)
 

Private Attributes

bool initialized
 
const DigestInfoinfo
 
const DigestAlgorithm * meth
 
DigestCTX ctx
 

Friends

class HMACContext
 

Detailed Description

Definition at line 161 of file digest.hpp.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
Enumerator
MAX_DIGEST_SIZE 

Definition at line 173 of file digest.hpp.

Constructor & Destructor Documentation

◆ DigestContext() [1/3]

DigestContext::DigestContext ( const DigestContext )
privatedelete

◆ DigestContext() [2/3]

DigestContext::DigestContext ( )
inline

Definition at line 178 of file digest.hpp.

◆ DigestContext() [3/3]

DigestContext::DigestContext ( const CryptoAlgs::Type  alg)
inline

Definition at line 183 of file digest.hpp.

Member Function Documentation

◆ check_initialized()

void DigestContext::check_initialized ( ) const
inlineprivate

Definition at line 253 of file digest.hpp.

◆ clear()

void DigestContext::clear ( )
inlineprivate

Definition at line 248 of file digest.hpp.

◆ digest_type()

static const DigestInfo * DigestContext::digest_type ( const CryptoAlgs::Type  alg)
inlinestaticprivate

Definition at line 225 of file digest.hpp.

Here is the caller graph for this function:

◆ final()

size_t DigestContext::final ( unsigned char *  out)
inline

Definition at line 205 of file digest.hpp.

◆ init()

void DigestContext::init ( const CryptoAlgs::Type  alg)
inline

Definition at line 188 of file digest.hpp.

◆ is_initialized()

bool DigestContext::is_initialized ( ) const
inline

Definition at line 219 of file digest.hpp.

◆ OPENVPN_EXCEPTION()

DigestContext::OPENVPN_EXCEPTION ( apple_digest_error  )

◆ OPENVPN_SIMPLE_EXCEPTION() [1/2]

DigestContext::OPENVPN_SIMPLE_EXCEPTION ( apple_digest_final_overflow  )

◆ OPENVPN_SIMPLE_EXCEPTION() [2/2]

DigestContext::OPENVPN_SIMPLE_EXCEPTION ( apple_digest_uninitialized  )

◆ operator=()

DigestContext & DigestContext::operator= ( const DigestContext )
privatedelete

◆ size()

size_t DigestContext::size ( ) const
inline

Definition at line 213 of file digest.hpp.

◆ update()

void DigestContext::update ( const unsigned char *  in,
const size_t  size 
)
inline

Definition at line 198 of file digest.hpp.

Friends And Related Symbol Documentation

◆ HMACContext

friend class HMACContext
friend

Definition at line 167 of file digest.hpp.

Member Data Documentation

◆ ctx

DigestCTX DigestContext::ctx
private

Definition at line 264 of file digest.hpp.

◆ info

const DigestInfo* DigestContext::info
private

Definition at line 262 of file digest.hpp.

◆ initialized

bool DigestContext::initialized
private

Definition at line 261 of file digest.hpp.

◆ meth

const DigestAlgorithm* DigestContext::meth
private

Definition at line 263 of file digest.hpp.


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