CMS 3D CMS Logo

Cipher.h
Go to the documentation of this file.
1 #ifndef CondCore_CondDB_Cipher_h
2 #define CondCore_CondDB_Cipher_h
3 
4 #include <iostream>
5 #include <string>
6 
7 struct BLOWFISH_CTX;
8 
9 namespace cond {
10 
11  namespace auth {
12 
13  class Cipher {
14  public:
15  explicit Cipher(const std::string& key);
16 
17  ~Cipher();
18 
19  size_t encrypt(const std::string& input, unsigned char*& output);
20 
21  std::string decrypt(const unsigned char* input, size_t inputSize);
22 
24 
26 
27  private:
28  size_t bf_process_alloc(const unsigned char* input,
29  size_t input_size,
30  unsigned char*& output,
31  bool decrypt = false);
32 
33  private:
35  };
36  } // namespace auth
37 
38 } // namespace cond
39 
40 #endif // CondCore_CondDB_Cipher_h
static std::string const input
Definition: EdmProvDump.cc:50
size_t encrypt(const std::string &input, unsigned char *&output)
Definition: Cipher.cc:70
Cipher(const std::string &key)
Definition: Cipher.cc:10
size_t bf_process_alloc(const unsigned char *input, size_t input_size, unsigned char *&output, bool decrypt=false)
Definition: Cipher.cc:17
std::string b64encrypt(const std::string &input)
Definition: Cipher.cc:109
std::string decrypt(const unsigned char *input, size_t inputSize)
Definition: Cipher.cc:79
Definition: plugin.cc:23
Definition: output.py:1
BLOWFISH_CTX * m_ctx
Definition: Cipher.h:34
std::string b64decrypt(const std::string &input)
Definition: Cipher.cc:122