5 #include "imports/std/optional" 7 #include "basic_Error.hpp" 26 ( std::string base64_license
27 , std::string signature
28 , std::string decoded_license
30 : base64_license_(std::move(base64_license))
31 , signature_(std::move(signature))
32 , license_(std::move(decoded_license))
35 std::string base64_license_;
36 std::string signature_;
39 std::string
const& get_base64_license()
const;
41 std::string
const& get_signature()
const;
43 std::string
const& get_license()
const;
45 template<
typename SignatureVerifier>
47 optional<RawLicenseKey>
50 , SignatureVerifier
const& verifier
51 , std::string base64_license
52 , std::string signature
55 if (e) {
return nullopt; }
57 optional<std::string> decoded = ::cryptolens_io::v20190401::internal::b64_decode(base64_license);
60 e.set(
api::main(), errors::Subsystem::Base64);
64 if (verifier.verify_message(e, *decoded, signature)) {
67 ( std::move(base64_license)
68 , std::move(signature)
Definition: ActivateError.hpp:5
Definition: RawLicenseKey.hpp:24
Definition: basic_Error.hpp:90