Virgil Security C++ SDK
Public Member Functions | Static Public Attributes | List of all members
virgil::sdk::cards::ModelSigner Class Reference

Class responsible for signing RawSignerModel. More...

#include <ModelSigner.h>

Public Member Functions

 ModelSigner (std::shared_ptr< crypto::Crypto > crypto)
 Constructor. More...
 
const std::shared_ptr< crypto::Crypto > & crypto () const
 Getter. More...
 
void sign (client::models::RawSignedModel &model, const std::string &signer, const crypto::keys::PrivateKey &privateKey) const
 Adds signature to given RawSignedModel with provided signer and PrivateKey. More...
 
void sign (client::models::RawSignedModel &model, const std::string &signer, const crypto::keys::PrivateKey &privateKey, const VirgilByteArray &additionalData) const
 Adds signature to given RawSignedModel with provided signer, PrivateKey and additional data. More...
 
void sign (client::models::RawSignedModel &model, const std::string &signer, const crypto::keys::PrivateKey &privateKey, const std::unordered_map< std::string, std::string > &extraFields) const
 Adds signature to given RawSignedModel with provided signer, PrivateKey and additional data. More...
 
void selfSign (client::models::RawSignedModel &model, const crypto::keys::PrivateKey &privateKey) const
 Adds owner's signature to given RawSignedModel using provided PrivateKey. More...
 
void selfSign (client::models::RawSignedModel &model, const crypto::keys::PrivateKey &privateKey, const VirgilByteArray &additionalData) const
 Adds owner's signature to given RawSignedModel using provided PrivateKey and additional data. More...
 
void selfSign (client::models::RawSignedModel &model, const crypto::keys::PrivateKey &privateKey, const std::unordered_map< std::string, std::string > &extraFields) const
 Adds owner's signature to given RawSignedModel using provided PrivateKey and additional data. More...
 

Static Public Attributes

static const std::string selfSignerIdentifier
 signer identifier for self signatures
 

Detailed Description

Class responsible for signing RawSignerModel.

Constructor & Destructor Documentation

virgil::sdk::cards::ModelSigner::ModelSigner ( std::shared_ptr< crypto::Crypto crypto)

Constructor.

Parameters
cryptostd::shared_ptr to Crypto instance

Member Function Documentation

const std::shared_ptr<crypto::Crypto>& virgil::sdk::cards::ModelSigner::crypto ( ) const

Getter.

Returns
std::shared_ptr to Crypto instance
void virgil::sdk::cards::ModelSigner::selfSign ( client::models::RawSignedModel model,
const crypto::keys::PrivateKey privateKey 
) const

Adds owner's signature to given RawSignedModel using provided PrivateKey.

Parameters
modelRawSignedModel to sign
privateKeyPrivateKey to sign with
void virgil::sdk::cards::ModelSigner::selfSign ( client::models::RawSignedModel model,
const crypto::keys::PrivateKey privateKey,
const VirgilByteArray &  additionalData 
) const

Adds owner's signature to given RawSignedModel using provided PrivateKey and additional data.

Parameters
modelRawSignedModel to sign
privateKeyPrivateKey to sign with
additionalDataadditional data to sign with model
void virgil::sdk::cards::ModelSigner::selfSign ( client::models::RawSignedModel model,
const crypto::keys::PrivateKey privateKey,
const std::unordered_map< std::string, std::string > &  extraFields 
) const

Adds owner's signature to given RawSignedModel using provided PrivateKey and additional data.

Parameters
modelRawSignedModel to sign
privateKeyPrivateKey to sign with
extraFieldsstd::unordered_map with additional data to sign with model
void virgil::sdk::cards::ModelSigner::sign ( client::models::RawSignedModel model,
const std::string &  signer,
const crypto::keys::PrivateKey privateKey 
) const

Adds signature to given RawSignedModel with provided signer and PrivateKey.

Parameters
modelRawSignedModel to sign
signeridentifier of signer
privateKeyPrivateKey to sign with
void virgil::sdk::cards::ModelSigner::sign ( client::models::RawSignedModel model,
const std::string &  signer,
const crypto::keys::PrivateKey privateKey,
const VirgilByteArray &  additionalData 
) const

Adds signature to given RawSignedModel with provided signer, PrivateKey and additional data.

Parameters
modelRawSignedModel to sign
signeridentifier of signer
privateKeyPrivateKey to sign with
additionalDataadditional data to sign with model
void virgil::sdk::cards::ModelSigner::sign ( client::models::RawSignedModel model,
const std::string &  signer,
const crypto::keys::PrivateKey privateKey,
const std::unordered_map< std::string, std::string > &  extraFields 
) const

Adds signature to given RawSignedModel with provided signer, PrivateKey and additional data.

Parameters
modelRawSignedModel to sign
signeridentifier of signer
privateKeyPrivateKey to sign with
extraFieldsstd::unordered_map with additional data to sign with model

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