identt
SignedJson.hpp
Go to the documentation of this file.
1 
33 #ifndef _IDENTT_QUERY_SIGNED_JSON_HPP_
34 #define _IDENTT_QUERY_SIGNED_JSON_HPP_
35 
36 
37 #include <query/QueryBase.hpp>
39 #include <crypto/CryptoTraits.hpp>
40 
41 namespace identt {
42 namespace query {
43 class SignedJson {
44 public:
45  using SignatureListT=std::vector<::identt::query::SignatureT>;
46 
51  SignedJson();
52 
57  virtual ~SignedJson();
58 
81  void AddSign(
82  ::identt::utils::SharedTable::pointer stptr,
83  const google::protobuf::Message* result,
84  const ::identt::query::PubKeyT* pubkey,
85  std::string& output,
86  SignatureListT& signatures
87  );
88 
114  void AddSign(
115  ::identt::utils::SharedTable::pointer stptr,
116  const google::protobuf::Message* result,
117  const google::protobuf::Message* uresult,
118  const ::identt::query::PubKeyT* pubkey,
119  std::string& output,
120  SignatureListT& signatures
121  );
122 
145  void AddSign(
146  ::identt::utils::SharedTable::pointer stptr,
147  const std::string input,
148  const ::identt::query::PubKeyT* pubkey,
149  std::string& output,
150  SignatureListT& signatures
151  );
152 
178  void AddSign(
179  ::identt::utils::SharedTable::pointer stptr,
180  const std::string input,
181  const std::string uinput,
182  const ::identt::query::PubKeyT* pubkey,
183  std::string& output,
184  SignatureListT& signatures
185  );
186 
212  void VerifySign(
213  ::identt::utils::SharedTable::pointer stptr,
214  const std::string input,
215  const ::identt::query::PubKeyT* pubkey,
216  std::string& output,
217  std::string& uoutput,
218  SignatureListT& signatures
219  );
220 
243  void VerifySign(
244  ::identt::utils::SharedTable::pointer stptr,
245  const std::string input,
246  const ::identt::query::PubKeyT* pubkey,
247  google::protobuf::Message* result,
248  SignatureListT& signatures
249  );
250 
276  void VerifySign(
277  ::identt::utils::SharedTable::pointer stptr,
278  const std::string input,
279  const ::identt::query::PubKeyT* pubkey,
280  google::protobuf::Message* result,
281  google::protobuf::Message* uresult,
282  SignatureListT& signatures
283  );
284 
285 private:
286 
303  ::identt::crypto::CryptoTraits::pointer GetSigner(
304  ::identt::utils::SharedTable::pointer stptr,
305  const ::identt::query::PubKeyT* pubkey,
306  const unsigned int scope
307  );
308 
309 };
310 } // namespace query
311 } // namespace identt
312 #endif /* _IDENTT_QUERY_SIGNED_JSON_HPP_ */
Definition: SignedJson.hpp:43
SignedJson()
Default Constructor.
Definition: SignedJson.cc:41
Definition: CryptoBase.hpp:49
void VerifySign(::identt::utils::SharedTable::pointer stptr, const std::string input, const ::identt::query::PubKeyT *pubkey, std::string &output, std::string &uoutput, SignatureListT &signatures)
VerifySign: Verify signature and get string.
virtual ~SignedJson()
Default Destructor.
Definition: SignedJson.cc:47
void AddSign(::identt::utils::SharedTable::pointer stptr, const google::protobuf::Message *result, const ::identt::query::PubKeyT *pubkey, std::string &output, SignatureListT &signatures)
AddSign: Add Signature pb, also adds older signatures.