RabbitCommon v2.2.6
Loading...
Searching...
No Matches
Public Member Functions | Private Attributes | List of all members
RabbitCommon::CEncrypt Class Reference

The encrypt class. More...

#include <RabbitCommonEncrypt.h>

Public Member Functions

 CEncrypt (const char *pszPassword="RabbitCommon")
 
int SetPassword (const char *pszPassword)
 
int Encode (const char *pIn, const int &inLen, char **pOut, int &outLen)
 
int Encode (const QString &szIn, QByteArray &szOut)
 
int Dencode (const char *pIn, const int &inLen, char **pOut, int &outLen)
 
int Dencode (const char *pIn, const int &inLen, std::string &szOut)
 
int Dencode (const QByteArray &szIn, QString &szOut)
 

Private Attributes

std::string m_szPassword
 

Detailed Description

The encrypt class.

Definition at line 21 of file RabbitCommonEncrypt.h.

Constructor & Destructor Documentation

◆ CEncrypt()

RabbitCommon::CEncrypt::CEncrypt ( const char *  pszPassword = "RabbitCommon")

Definition at line 23 of file RabbitCommonEncrypt.cpp.

◆ ~CEncrypt()

RabbitCommon::CEncrypt::~CEncrypt ( )

Definition at line 28 of file RabbitCommonEncrypt.cpp.

Member Function Documentation

◆ Dencode() [1/3]

int RabbitCommon::CEncrypt::Dencode ( const char *  pIn,
const int &  inLen,
char **  pOut,
int &  outLen 
)
Parameters
pIn输入要解密的数据指针
inlen输入要解密的数据的长度
pOut输出解密了的数据指针.调用者使用完成后,需要用delete []*pOut
outLen解密了的数据长度

Definition at line 106 of file RabbitCommonEncrypt.cpp.

◆ Dencode() [2/3]

int RabbitCommon::CEncrypt::Dencode ( const char *  pIn,
const int &  inLen,
std::string &  szOut 
)

Definition at line 119 of file RabbitCommonEncrypt.cpp.

◆ Dencode() [3/3]

int RabbitCommon::CEncrypt::Dencode ( const QByteArray &  szIn,
QString &  szOut 
)

Definition at line 81 of file RabbitCommonEncrypt.cpp.

◆ Encode() [1/2]

int RabbitCommon::CEncrypt::Encode ( const char *  pIn,
const int &  inLen,
char **  pOut,
int &  outLen 
)
Parameters
pIn输入要加密的数据指针
inlen输入要加密的数据的长度
pOut输出加密了的数据指针.调用者使用完成后,需要用delete []*pOut
outLen加密了的数据长度

Definition at line 48 of file RabbitCommonEncrypt.cpp.

◆ Encode() [2/2]

int RabbitCommon::CEncrypt::Encode ( const QString &  szIn,
QByteArray &  szOut 
)

Definition at line 61 of file RabbitCommonEncrypt.cpp.

◆ SetPassword()

int RabbitCommon::CEncrypt::SetPassword ( const char *  pszPassword)

Definition at line 32 of file RabbitCommonEncrypt.cpp.

Member Data Documentation

◆ m_szPassword

std::string RabbitCommon::CEncrypt::m_szPassword
private

Definition at line 47 of file RabbitCommonEncrypt.h.


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