Class Verification

Namespace: Keychain

Assemblies: libkeychain.dll

Inheritance: Object → Verification

Definition

A Verification object contains result of a Gateway’s 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.


Constructors

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


Method Summary

Return Type Method and Description

bool

isVerified()

Whether the data’s signature was cryptographically verified with the data’s specified public key.

bool

signerIsKnown()

Whether the data signature’s public key is associated with a known contact/persona.

Facade

getFacade()

Get the Facade (Persona or Contact) that is associated with the data signature’s public key.

Int64

getTimestamp()

Get the signatures’s timestamp in milliseconds since the epoch.


Methods

isVerified() Method

public bool isVerified();

Determines whether data’s signature was cryptographically verified with the public key specified in a signed data structure.

Parameters

None

Returns

bool

true if the data’s signature was cryptographically verified using the public key and cryptographic algorithm specified in the signed data structure; otherwise, false.




signerIsKnown() Method

public bool signerIsKnown();

Determines whether data’s signature public key is contained in a locally stored keychain of either either an internal persona or a previously paired contact.

Parameters

None

Returns

bool

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




getFacade() Method

public Facade getFacade();

Get the Facade that is associated internally with the data’s public key. The data’s public key (or a reference to it) is included in the signed data string.

Parameters

None

Returns

A facade object representing the identity associated with the data’s public key; otherwise, a NULL facade (a facade for which isNull() returns true).




getTimestamp() Method

public Int64 getTimestamp();

Get the time the signature was added to the signed data in expressed milliseconds since Jan 1, 1970.

Parameters

None

Returns

Int64

The time the signature was added to the signed data in expressed milliseconds since Jan 1, 1970.


Thread Safety

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