Wire Sysio Wire Sysion 1.0.0
Loading...
Searching...
No Matches
CAutoBN_CTX Class Reference

Public Member Functions

 CAutoBN_CTX ()
 
 ~CAutoBN_CTX ()
 
 operator BN_CTX * ()
 
BN_CTX & operator* ()
 
BN_CTX ** operator& ()
 
bool operator! ()
 

Protected Member Functions

BN_CTX * operator= (BN_CTX *pnew)
 

Protected Attributes

BN_CTX * pctx
 

Detailed Description

RAII encapsulated BN_CTX (OpenSSL bignum context)

Definition at line 41 of file base58.cpp.

Constructor & Destructor Documentation

◆ CAutoBN_CTX()

CAutoBN_CTX::CAutoBN_CTX ( )
inline

Definition at line 48 of file base58.cpp.

49 {
50 pctx = BN_CTX_new();
51 if (pctx == NULL)
52 throw bignum_error("CAutoBN_CTX : BN_CTX_new() returned NULL");
53 }
BN_CTX * pctx
Definition base58.cpp:44

◆ ~CAutoBN_CTX()

CAutoBN_CTX::~CAutoBN_CTX ( )
inline

Definition at line 55 of file base58.cpp.

56 {
57 if (pctx != NULL)
58 BN_CTX_free(pctx);
59 }

Member Function Documentation

◆ operator BN_CTX *()

CAutoBN_CTX::operator BN_CTX * ( )
inline

Definition at line 61 of file base58.cpp.

61{ return pctx; }

◆ operator!()

bool CAutoBN_CTX::operator! ( )
inline

Definition at line 64 of file base58.cpp.

64{ return (pctx == NULL); }

◆ operator&()

BN_CTX ** CAutoBN_CTX::operator& ( )
inline

Definition at line 63 of file base58.cpp.

63{ return &pctx; }

◆ operator*()

BN_CTX & CAutoBN_CTX::operator* ( )
inline

Definition at line 62 of file base58.cpp.

62{ return *pctx; }

◆ operator=()

BN_CTX * CAutoBN_CTX::operator= ( BN_CTX * pnew)
inlineprotected

Definition at line 45 of file base58.cpp.

45{ return pctx = pnew; }

Member Data Documentation

◆ pctx

BN_CTX* CAutoBN_CTX::pctx
protected

Definition at line 44 of file base58.cpp.


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