Cryptolens Client API for C++
SignatureVerifier_CryptoAPI.hpp
1 #pragma once
2 
3 #include <string>
4 
5 #include "imports/windows/Windows.h"
6 #include "imports/windows/wincrypt.h"
7 
8 #include "basic_Error.hpp"
9 #include "Error.hpp"
10 #include "SignatureVerifier_v20190401_to_v20180502.hpp"
11 
12 namespace cryptolens_io {
13 
14 namespace v20190401 {
15 
27 {
28 public:
29 #ifndef CRYPTOLENS_20190701_ALLOW_IMPLICIT_CONSTRUCTORS
30  explicit
31 #endif
33 #ifndef CRYPTOLENS_ENABLE_DANGEROUS_COPY_MOVE_CONSTRUCTOR
36  void operator=(SignatureVerifier_CryptoAPI const&) = delete;
37  void operator=(SignatureVerifier_CryptoAPI &&) = delete;
38 #endif
40 
41  void set_modulus_base64(basic_Error & e, std::string const& modulus_base64);
42  void set_exponent_base64(basic_Error & e, std::string const& exponent_base64) {}
43  bool verify_message(basic_Error & e, std::string const& message, std::string const& signature_base64) const;
44 private:
45  HCRYPTPROV hProv_;
46  HCRYPTKEY hPubKey_;
47 
48  void init(basic_Error & e);
49  void set_modulus_base64_(basic_Error & e, std::string const& modulus_base64);
50 };
51 
52 } // namespace v20190401
53 
54 namespace latest {
55 
57 
58 } // namespace latest
59 
60 namespace v20180502 {
61 
73 
74 } // namespace v20180502
75 
76 } // namespace cryptolens_io
void set_modulus_base64(basic_Error &e, std::string const &modulus_base64)
Definition: SignatureVerifier_CryptoAPI.cpp:105
Definition: ActivateError.hpp:5
Definition: basic_Error.hpp:90
Definition: SignatureVerifier_CryptoAPI.hpp:26
bool verify_message(basic_Error &e, std::string const &message, std::string const &signature_base64) const
Definition: SignatureVerifier_CryptoAPI.cpp:166
Definition: SignatureVerifier_v20190401_to_v20180502.hpp:20