Nix (Dev) 3.5.10
dev - 3.5.10 - 1af9301
Loading...
Searching...
No Matches
CEncryption Class Reference

#include <CEncryption.hpp>

Static Public Member Functions

static int32_t decryptEVP (unsigned char *ciphertext, int32_t ciphertext_len, unsigned char *key, unsigned char *iv, unsigned char *plaintext)
 
static int32_t encryptEVP (unsigned char *plaintext, int32_t plaintext_len, unsigned char *key, unsigned char *iv, unsigned char *ciphertext)
 
static std::string md5 (const std::string &message)
 
static std::string sha256 (const std::string &message)
 
static std::string EncryptPassword (const std::string &plainText)
 
static std::string DecryptPassword (const std::string &cypherText)
 
static unsigned char * getEVPkey ()
 
static unsigned char * getEVPiv ()
 
static std::string base64_decode (std::string &in)
 
static std::string base64_encode (const std::string &in)
 

Member Function Documentation

◆ base64_decode()

std::string CEncryption::base64_decode ( std::string & in)
static

◆ base64_encode()

std::string CEncryption::base64_encode ( const std::string & in)
static

◆ decryptEVP()

int32_t CEncryption::decryptEVP ( unsigned char * ciphertext,
int32_t ciphertextLen,
unsigned char * key,
unsigned char * iv,
unsigned char * plaintext )
static

Decrypt an encoded text using EVP functions

Parameters
ciphertextEncoded Text
ciphertextLenEncoded Text Length
keyEVP Key
ivEVP Initialization Vector
plaintextDecrypted Text (output param)
Returns
Decrypted Text Length

◆ DecryptPassword()

std::string CEncryption::DecryptPassword ( const std::string & cypherText)
static

◆ encryptEVP()

int32_t CEncryption::encryptEVP ( unsigned char * plaintext,
int32_t plaintextLen,
unsigned char * key,
unsigned char * iv,
unsigned char * ciphertext )
static

Encrypt a plain text using EVP functions

Parameters
plaintextText to encrypt
plaintextLenLength of plainText param
keyEVP Key
ivEVP initialization vector
ciphertextEncoding Text (output param)
Returns
Encoding Text Length

◆ EncryptPassword()

std::string CEncryption::EncryptPassword ( const std::string & plainText)
static

◆ getEVPiv()

unsigned char * CEncryption::getEVPiv ( )
static

Get EVP Initialization Vector

Returns
Value of Initialization Vector

◆ getEVPkey()

unsigned char * CEncryption::getEVPkey ( )
static

Get EVP Public Key

Returns
Public Key

◆ md5()

std::string CEncryption::md5 ( const std::string & messageToEncrypt)
static

Encrypt a message using codification MD5

Parameters
messageToEncryptMessage to Encrypt
Returns
Hashcode

◆ sha256()

std::string CEncryption::sha256 ( const std::string & messageToEncrypt)
static

Encrypt a message using codification SHA256

Parameters
messageToEncryptMessage to encrypt
Returns
Hashcode

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