Class verification

#include <keychain/wallet/verification.hpp>

Namespace: keychain

Inheritance: verification

Description

A verification object contains result of an attempt to verify one of the signatures on signed data. The gateway verify methods return an array of verification objects, one for each signature in the data. The verification object provides information on whether the signature was cryptographically valid, whether the identity of the signature’s owner is known as a contact, and other attributes.

Applications should use the information provided to implement logic about whether to accept the data and how to handle errors.

The verification object should not be instantiated directly by the developer, as it is instantiated and returned by gateway cryptographic verification methods.

Since: v2.0

Public Member Functions

Return type Method and Description

bool

is_verified()

Returns true if the data’s signature is cryptographically verified

bool

signer_is_known()

Returns true if the data’s signature public key is known to the active persona

facade

get_facade()

Get the facade (persona or contact) that is associated with the data signature’s public key

kc::timestamp_t

get_timestamp()

Get the signatures’s timestamp in milliseconds since the epoch

Public Member Functions Detail

is_verified

bool is_verified()

Returns true if the data’s signature was cryptographically verified with the public key specified in a signed data structure

Returns:

true if the data was verified

signer_is_known

bool signer_is_known()

Returns true if the data’s signature public key is contained in a locally stored keychain of either an internal persona or a previously paired contact

Returns:

true if the signer is a known contact/persona

get_facade

kc::facade get_facade()

Get the facade (persona or contact) that is associated with the data signature’s public key. If none is found, returns a NULL facade (is_null() is true).

Returns:

Returns the contact/persona associated with the signer, or a null-pattern Facade

get_timestamp

kc::timestamp_t get_timestamp()

Get the signatures’s timestamp in milliseconds since the epoch

Returns:

The Unix epoch time for the signature timestamp

Thread Safety

This class is fully thread-safe; any of its methods may be invoked in multiple threads concurrently.