Cipher Class
|
#include "cipher.h"
#include <fstream>
#include <iostream>
#include <iomanip>
#include <string>
#include <vector>
#include <stdexcept>
#include <sstream>
#include <cstring>
#include <cstdlib>
#include <unistd.h>
#include <openssl/aes.h>
#include <openssl/bio.h>
#include <openssl/evp.h>
#include <openssl/buffer.h>
Go to the source code of this file.
Namespaces | |
anonymous_namespace{cipher.cc} | |
Macros | |
#define | DBG_BDUMP(a, x) if(m_debug) bdump(__FILE__,__LINE__,#a,a,x) |
#define | DBG_FCT(fct) if(m_debug) cout << DBG_PRE << "FCT " << fct << endl |
#define | DBG_MADEIT cout << DBG_PRE << "MADE IT" << endl |
#define | DBG_MDUMP(a) if(m_debug) bdump(__FILE__,__LINE__,#a,(unsigned char*)a.c_str(),a.size()) |
#define | DBG_PKV(v) if(m_debug) vdump(__FILE__,__LINE__,#v,v) |
#define | DBG_PKVR(k, v) if(m_debug) vdump(__FILE__,__LINE__,k,v) |
#define | DBG_PRE __FILE__ << ":" << __LINE__ << ": " |
#define | DBG_TDUMP(v) if(m_debug) tdump(__FILE__,__LINE__,#v,v) |
#define | PKV(v) vdump(__FILE__,__LINE__,#v,v) |
#define | SALTED_PREFIX "Salted__" |
Functions | |
void | anonymous_namespace{cipher.cc}::bdump (const string &fn, uint ln, const string &prefix, unsigned char *a, unsigned int len) |
template<typename T > | |
void | anonymous_namespace{cipher.cc}::tdump (const string &fn, uint ln, const string &prefix, const T &d) |
template<typename T > | |
void | anonymous_namespace{cipher.cc}::vdump (const string &fn, uint ln, const string &prefix, const T &d) |
template<> | |
void | anonymous_namespace{cipher.cc}::vdump< string > (const string &fn, uint ln, const string &prefix, const string &d) |
#define DBG_BDUMP | ( | a, | |
x | |||
) | if(m_debug) bdump(__FILE__,__LINE__,#a,a,x) |
Definition at line 46 of file cipher.cc.
Referenced by Cipher::decrypt(), and Cipher::encrypt().
#define DBG_FCT | ( | fct | ) | if(m_debug) cout << DBG_PRE << "FCT " << fct << endl |
Definition at line 42 of file cipher.cc.
Referenced by Cipher::decode_base64(), Cipher::decode_cipher(), Cipher::decrypt(), Cipher::decrypt_file(), Cipher::encode_base64(), Cipher::encode_cipher(), Cipher::encrypt(), Cipher::encrypt_file(), Cipher::file_read(), Cipher::file_write(), Cipher::init(), and Cipher::set_salt().
#define DBG_MDUMP | ( | a | ) | if(m_debug) bdump(__FILE__,__LINE__,#a,(unsigned char*)a.c_str(),a.size()) |
Definition at line 47 of file cipher.cc.
Referenced by Cipher::decrypt(), and Cipher::encrypt().
#define DBG_PKV | ( | v | ) | if(m_debug) vdump(__FILE__,__LINE__,#v,v) |
Definition at line 44 of file cipher.cc.
Referenced by Cipher::init().
#define DBG_PKVR | ( | k, | |
v | |||
) | if(m_debug) vdump(__FILE__,__LINE__,k,v) |
#define DBG_TDUMP | ( | v | ) | if(m_debug) tdump(__FILE__,__LINE__,#v,v) |
Definition at line 43 of file cipher.cc.
Referenced by Cipher::init().
#define SALTED_PREFIX "Salted__" |
Definition at line 51 of file cipher.cc.
Referenced by Cipher::decrypt(), and Cipher::encode_cipher().