test
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 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 
16  explicit Cipher( const std::string& key );
17 
18  ~Cipher();
19 
20  size_t encrypt( const std::string& input, unsigned char*& output );
21 
22  std::string decrypt( const unsigned char* input, size_t inputSize );
23 
24  std::string b64encrypt( const std::string& input );
25 
26  std::string b64decrypt( const std::string& input );
27 
28  private:
29 
30  size_t bf_process_alloc( const unsigned char* input, size_t input_size, unsigned char*& output, bool decrypt=false );
31 
32  private:
33 
35  };
36  }
37 
38 }
39 
40 #endif // CondCore_CondDB_Cipher_h
41 
static std::string const input
Definition: EdmProvDump.cc:44
size_t encrypt(const std::string &input, unsigned char *&output)
Definition: Cipher.cc:71
string key
FastSim: produces sample of signal events, overlayed with premixed minbias events.
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:20
std::string b64encrypt(const std::string &input)
Definition: Cipher.cc:105
std::string decrypt(const unsigned char *input, size_t inputSize)
Definition: Cipher.cc:79
BLOWFISH_CTX * m_ctx
Definition: Cipher.h:34
std::string b64decrypt(const std::string &input)
Definition: Cipher.cc:117