Diana Software
Public Types | Public Member Functions | Private Member Functions | Private Attributes | List of all members
QCryptoRSAEnvelope Class Reference

Public Types

enum  Mode { ENCRYPT , DECRYPT }
 

Public Member Functions

 QCryptoRSAEnvelope (const std::string &pKey, const Mode mode)
 
std::vector< unsigned char > Process (const std::vector< unsigned char > &message)
 
std::vector< unsigned char > Process (const std::string &message)
 
virtual ~QCryptoRSAEnvelope ()
 

Private Member Functions

unsigned char * Convert (const std::vector< unsigned char > &input)
 
std::vector< unsigned char > Convert (const unsigned char *input, const size_t n)
 
void Print (const char *header, const unsigned char *data, const size_t n)
 

Private Attributes

Mode fMode
 
EVP_CIPHER_CTXfCTX
 
EVP_PKEYfPKey
 

Detailed Description

Definition at line 10 of file QCryptoRSAEnvelope.hh.

Member Enumeration Documentation

◆ Mode

Enumerator
ENCRYPT 
DECRYPT 

Definition at line 12 of file QCryptoRSAEnvelope.hh.

Constructor & Destructor Documentation

◆ QCryptoRSAEnvelope()

QCryptoRSAEnvelope::QCryptoRSAEnvelope ( const std::string &  pKey,
const Mode  mode 
)

◆ ~QCryptoRSAEnvelope()

QCryptoRSAEnvelope::~QCryptoRSAEnvelope ( )
virtual

Definition at line 66 of file QCryptoRSAEnvelope.cc.

References fCTX, and fPKey.

Member Function Documentation

◆ Convert() [1/2]

unsigned char * QCryptoRSAEnvelope::Convert ( const std::vector< unsigned char > &  input)
private

Definition at line 194 of file QCryptoRSAEnvelope.cc.

Referenced by Process().

◆ Convert() [2/2]

std::vector< unsigned char > QCryptoRSAEnvelope::Convert ( const unsigned char *  input,
const size_t  n 
)
private

Definition at line 203 of file QCryptoRSAEnvelope.cc.

◆ Print()

void QCryptoRSAEnvelope::Print ( const char *  header,
const unsigned char *  data,
const size_t  n 
)
private

Definition at line 213 of file QCryptoRSAEnvelope.cc.

◆ Process() [1/2]

std::vector< unsigned char > QCryptoRSAEnvelope::Process ( const std::string &  message)

Definition at line 75 of file QCryptoRSAEnvelope.cc.

References DianaThrow, ENCRYPT, err, fMode, Process(), and QERR_UNKNOWN_ERR.

◆ Process() [2/2]

std::vector< unsigned char > QCryptoRSAEnvelope::Process ( const std::vector< unsigned char > &  message)

Definition at line 89 of file QCryptoRSAEnvelope.cc.

References Convert(), DianaThrow, ENCRYPT, err, fCTX, fMode, fPKey, and QERR_UNKNOWN_ERR.

Referenced by Process().

Member Data Documentation

◆ fCTX

EVP_CIPHER_CTX* QCryptoRSAEnvelope::fCTX
private

Definition at line 30 of file QCryptoRSAEnvelope.hh.

Referenced by ClassImp(), Process(), and ~QCryptoRSAEnvelope().

◆ fMode

Mode QCryptoRSAEnvelope::fMode
private

Definition at line 28 of file QCryptoRSAEnvelope.hh.

Referenced by ClassImp(), and Process().

◆ fPKey

EVP_PKEY* QCryptoRSAEnvelope::fPKey
private

Definition at line 32 of file QCryptoRSAEnvelope.hh.

Referenced by ClassImp(), Process(), and ~QCryptoRSAEnvelope().


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