#include <CEncryption.hpp>
|
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) |
|
◆ 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
-
ciphertext | Encoded Text |
ciphertextLen | Encoded Text Length |
key | EVP Key |
iv | EVP Initialization Vector |
plaintext | Decrypted 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
-
plaintext | Text to encrypt |
plaintextLen | Length of plainText param |
key | EVP Key |
iv | EVP initialization vector |
ciphertext | Encoding 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
-
messageToEncrypt | Message to Encrypt |
- Returns
- Hashcode
◆ sha256()
std::string CEncryption::sha256 |
( |
const std::string & | messageToEncrypt | ) |
|
|
static |
Encrypt a message using codification SHA256
- Parameters
-
messageToEncrypt | Message to encrypt |
- Returns
- Hashcode
The documentation for this class was generated from the following files: