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

Virgil implementation of CardVerifierInterface. More...

#include <VirgilCardVerifier.h>

Inheritance diagram for virgil::sdk::cards::verification::VirgilCardVerifier:
virgil::sdk::cards::verification::CardVerifierInterface

Public Member Functions

 VirgilCardVerifier (std::shared_ptr< crypto::Crypto > crypto, std::vector< Whitelist > whitelists=std::vector< Whitelist >(), bool verifySelfSignature=true, bool verifyVirgilSignature=true)
 Constructor. More...
 
const std::shared_ptr< crypto::Crypto > & crypto () const
 Getter. More...
 
const crypto::keys::PublicKey virgilPublicKey () const
 Getter. More...
 
const std::vector< Whitelist > & whitelists () const
 Getter. More...
 
bool verifySelfSignature () const
 Getter. More...
 
bool verifyVirgilSignature () const
 
bool verifyCard (const Card &card) const override
 Verifies Card instance using set rules. More...
 
- Public Member Functions inherited from virgil::sdk::cards::verification::CardVerifierInterface
virtual ~CardVerifierInterface ()=default
 Virtual destructor.
 

Static Public Attributes

static const std::string selfSignerIdentifier_
 Signer identifier for self signatures.
 
static const std::string virgilSignerIdentifier_
 Signer identifier for Virgil Cards Service signature.
 
static const std::string virgilPublicKeyBase64_
 Base64 encoded string with Virgil Service's Public Key for verifying Virgil Cards Service signature.
 

Detailed Description

Virgil implementation of CardVerifierInterface.

Note
By default verifies Card's self signature and Virgil Cards Service signature

Constructor & Destructor Documentation

virgil::sdk::cards::verification::VirgilCardVerifier::VirgilCardVerifier ( std::shared_ptr< crypto::Crypto crypto,
std::vector< Whitelist whitelists = std::vector< Whitelist >(),
bool  verifySelfSignature = true,
bool  verifyVirgilSignature = true 
)

Constructor.

Parameters
cryptostd::shared_ptr to Crypto instance
whitelistsstd::vector with collections of verifiers
verifySelfSignatureVirgilCardVerifier will verify self signature if true
verifyVirgilSignatureVirgilCardVerifier will verify Virgil Cards Service signature if true
Note
VirgilCardVerifier verifies Card if it contains signature from AT LEAST one verifier from EACH Whitelist

Member Function Documentation

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

Getter.

Returns
std::shared_ptr to Crypto instance
bool virgil::sdk::cards::verification::VirgilCardVerifier::verifyCard ( const Card card) const
overridevirtual

Verifies Card instance using set rules.

Parameters
cardCard to verify
Returns
true if Card verified, false otherwise
Note
VirgilCardVerifier verifies Card if it contains signature from AT LEAST one verifier from EACH Whitelist

Implements virgil::sdk::cards::verification::CardVerifierInterface.

bool virgil::sdk::cards::verification::VirgilCardVerifier::verifySelfSignature ( ) const

Getter.

Returns
true if VirgilCardVerifier will verify self signature, false otherwise
bool virgil::sdk::cards::verification::VirgilCardVerifier::verifyVirgilSignature ( ) const

Getter

Returns
true if VirgilCardVerifier will verify Virgil Cards Service signature, false otherwise
const crypto::keys::PublicKey virgil::sdk::cards::verification::VirgilCardVerifier::virgilPublicKey ( ) const

Getter.

Returns
Public Key of Virgil Cards Service
const std::vector<Whitelist>& virgil::sdk::cards::verification::VirgilCardVerifier::whitelists ( ) const

Getter.

Returns
std::vector with collections of verifiers

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