CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
Cipher.h
Go to the documentation of this file.
1 #ifndef INCLUDE_COND_CIPHER_H
2 #define INCLUDE_COND_CIPHER_H
3 
4 #include <iostream>
5 #include <string>
6 
7 struct BLOWFISH_CTX;
8 
9 namespace cond {
10 
11  class Cipher {
12  public:
13 
14  explicit Cipher( const std::string& key );
15 
16  ~Cipher();
17 
18  size_t encrypt( const std::string& input, unsigned char*& output );
19 
20  std::string decrypt( const unsigned char* input, size_t inputSize );
21 
22  std::string b64encrypt( const std::string& input );
23 
24  std::string b64decrypt( const std::string& input );
25 
26  private:
27 
28  size_t bf_process_alloc( const unsigned char* input, size_t input_size, unsigned char*& output, bool decrypt=false );
29 
30  private:
31 
33  };
34 
35 }
36 
37 #endif
38 
BLOWFISH_CTX * m_ctx
Definition: Cipher.h:32
Cipher(const std::string &key)
Definition: Cipher.cc:10
std::string decrypt(const unsigned char *input, size_t inputSize)
Definition: Cipher.cc:79
static std::string const input
Definition: EdmProvDump.cc:43
size_t encrypt(const std::string &input, unsigned char *&output)
Definition: Cipher.cc:71
size_t bf_process_alloc(const unsigned char *input, size_t input_size, unsigned char *&output, bool decrypt=false)
Definition: Cipher.cc:20
std::string b64encrypt(const std::string &input)
Definition: Cipher.cc:105
std::string b64decrypt(const std::string &input)
Definition: Cipher.cc:117