Cryptolens Client API for C++
Public Member Functions | List of all members
cryptolens_io::v20190401::SignatureVerifier_CryptoAPI Class Reference

#include <SignatureVerifier_CryptoAPI.hpp>

Public Member Functions

 SignatureVerifier_CryptoAPI (basic_Error &e)
 
 SignatureVerifier_CryptoAPI (SignatureVerifier_CryptoAPI const &)=delete
 
 SignatureVerifier_CryptoAPI (SignatureVerifier_CryptoAPI &&)=delete
 
void operator= (SignatureVerifier_CryptoAPI const &)=delete
 
void operator= (SignatureVerifier_CryptoAPI &&)=delete
 
void set_modulus_base64 (basic_Error &e, std::string const &modulus_base64)
 
void set_exponent_base64 (basic_Error &e, std::string const &exponent_base64)
 
bool verify_message (basic_Error &e, std::string const &message, std::string const &signature_base64) const
 

Detailed Description

A signature verifier used by the library for checking the cryptographic signatures return by the Cryptolens Web API and thus makes sure the responses from the web API has not been tampered with. This signature verifier depends on the Microsoft CryptoAPI.

In order for this signature verifier to work the modulus and exponent must be set using the set_modulus_base64() and set_exponent_base64() methods.

Member Function Documentation

◆ set_modulus_base64()

void cryptolens_io::v20190401::SignatureVerifier_CryptoAPI::set_modulus_base64 ( basic_Error e,
std::string const &  modulus_base64 
)

Sets the modulus of the public key used by the cryptolens.io Web API for signing the responses.

This value is unique for each account and can be found on cryptolens.io at the "Account Settings" found in the personal menu ("Hello, <account name>!" in the upper right corner). The public key is listed in XML format as something similar to

<RSAKeyValue><Modulus>AbC=</Modulus><Exponent>deFG</Exponent></RSAKeyValue>

and in this case the string "AbC=" should be passed to this method.

◆ verify_message()

bool cryptolens_io::v20190401::SignatureVerifier_CryptoAPI::verify_message ( basic_Error e,
std::string const &  message,
std::string const &  signature_base64 
) const

This function is used internally by the library and need not be called.


The documentation for this class was generated from the following files: