github.com/jiajun1992/watercarver@v0.0.0-20191031150618-dfc2b17c0c4a/StadiumForWaterCarver/src/CipherTable.h (about) 1 #ifndef __CIPHER_TABLE_H__ 2 #define __CIPHER_TABLE_H__ 3 4 #include <vector> 5 #include <string> 6 #include <sstream> 7 8 #include "G_q.h" 9 #include "Mod_p.h" 10 #include "Cipher_elg.h" 11 #include "ElGammal.h" 12 #include "Pedersen.h" 13 14 using namespace std; 15 16 class CipherTable { 17 public: 18 CipherTable(); 19 CipherTable(string& ciphers, long m, ElGammal* elgammal); 20 CipherTable(vector<vector<Cipher_elg>* >* ciphers, long m); 21 virtual ~CipherTable(); 22 vector<vector<Cipher_elg>* >* getCMatrix(); 23 vector<vector<Mod_p>* >* getElementsMatrix(); 24 string getCipher(int i, int j); 25 string getElement(int i, int j); 26 Cipher_elg& get_elg_cipher(int i, int j); 27 28 int rows(); 29 int cols(); 30 void set_dimentions(int m, int n); 31 32 string encode_all_ciphers(); 33 private: 34 vector<vector<Cipher_elg>* > C_; 35 vector<vector<Mod_p>* > elements_; 36 int m_; 37 int n_; 38 const bool owner_; 39 }; 40 41 #endif