Diana Software
QCryptoRSAEnvelope.hh
Go to the documentation of this file.
1 #ifndef _Q_CRYPTO_HH_
2 #define _Q_CRYPTO_HH_
3 #include <string>
4 #include <vector>
5 #include <TObject.h>
6 
7 typedef struct evp_cipher_ctx_st EVP_CIPHER_CTX;
8 typedef struct evp_pkey_st EVP_PKEY;
9 
11  public:
12  enum Mode {
15  };
16  QCryptoRSAEnvelope(const std::string& pKey, const Mode mode);
17 
18  std::vector<unsigned char> Process(const std::vector<unsigned char>& message);
19  std::vector<unsigned char> Process(const std::string& message);
20 
21 
22 
23  virtual ~QCryptoRSAEnvelope();
24  private:
25 
26  unsigned char* Convert(const std::vector<unsigned char>& input);
27  std::vector<unsigned char> Convert(const unsigned char* input, const size_t n);
29 
31 
33  void Print(const char* header, const unsigned char* data, const size_t n);
34 
35 
36  ClassDef(QCryptoRSAEnvelope, 0)
37 
38 };
39 
40 #endif
struct evp_pkey_st EVP_PKEY
struct evp_cipher_ctx_st EVP_CIPHER_CTX
QCryptoRSAEnvelope(const std::string &pKey, const Mode mode)
std::vector< unsigned char > Process(const std::vector< unsigned char > &message)
EVP_CIPHER_CTX * fCTX
void Print(const char *header, const unsigned char *data, const size_t n)
unsigned char * Convert(const std::vector< unsigned char > &input)