Otclient  14/8/2020
Crypt Class Reference

#include <crypt.h>

Public Member Functions

 Crypt ()
 
 ~Crypt ()
 
std::string base64Encode (const std::string &decoded_string)
 
std::string base64Decode (const std::string &encoded_string)
 
std::string xorCrypt (const std::string &buffer, const std::string &key)
 
std::string encrypt (const std::string &decrypted_string)
 
std::string decrypt (const std::string &encrypted_string)
 
std::string genUUID ()
 
bool setMachineUUID (std::string uuidstr)
 
std::string getMachineUUID ()
 
void rsaSetPublicKey (const std::string &n, const std::string &e)
 
void rsaSetPrivateKey (const std::string &p, const std::string &q, const std::string &d)
 
bool rsaEncrypt (unsigned char *msg, int size)
 
bool rsaDecrypt (unsigned char *msg, int size)
 
int rsaGetSize ()
 

Detailed Description

Definition at line 36 of file crypt.h.

Constructor & Destructor Documentation

◆ Crypt()

Crypt::Crypt ( )

Definition at line 46 of file crypt.cpp.

◆ ~Crypt()

Crypt::~Crypt ( )

Definition at line 59 of file crypt.cpp.

Member Function Documentation

◆ base64Decode()

std::string Crypt::base64Decode ( const std::string &  encoded_string)

Definition at line 115 of file crypt.cpp.

◆ base64Encode()

std::string Crypt::base64Encode ( const std::string &  decoded_string)

Definition at line 72 of file crypt.cpp.

◆ decrypt()

std::string Crypt::decrypt ( const std::string &  encrypted_string)
inline

Definition at line 46 of file crypt.h.

Here is the caller graph for this function:

◆ encrypt()

std::string Crypt::encrypt ( const std::string &  decrypted_string)
inline

Definition at line 45 of file crypt.h.

Here is the caller graph for this function:

◆ genUUID()

std::string Crypt::genUUID ( )

Definition at line 171 of file crypt.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getMachineUUID()

std::string Crypt::getMachineUUID ( )

Definition at line 189 of file crypt.cpp.

Here is the caller graph for this function:

◆ rsaDecrypt()

bool Crypt::rsaDecrypt ( unsigned char *  msg,
int  size 
)

Definition at line 323 of file crypt.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ rsaEncrypt()

bool Crypt::rsaEncrypt ( unsigned char *  msg,
int  size 
)

Definition at line 296 of file crypt.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ rsaGetSize()

int Crypt::rsaGetSize ( )

Definition at line 350 of file crypt.cpp.

Here is the caller graph for this function:

◆ rsaSetPrivateKey()

void Crypt::rsaSetPrivateKey ( const std::string &  p,
const std::string &  q,
const std::string &  d 
)

Definition at line 262 of file crypt.cpp.

Here is the caller graph for this function:

◆ rsaSetPublicKey()

void Crypt::rsaSetPublicKey ( const std::string &  n,
const std::string &  e 
)

Definition at line 239 of file crypt.cpp.

Here is the caller graph for this function:

◆ setMachineUUID()

bool Crypt::setMachineUUID ( std::string  uuidstr)

Definition at line 178 of file crypt.cpp.

Here is the caller graph for this function:

◆ xorCrypt()

std::string Crypt::xorCrypt ( const std::string &  buffer,
const std::string &  key 
)

Definition at line 158 of file crypt.cpp.


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