libkazv
Loading...
Searching...
No Matches
Kazv::VerificationProcess Struct Reference

#include <verification-process.hpp>

Collaboration diagram for Kazv::VerificationProcess:

Classes

struct  RequestTag
 

Public Types

enum  Party { Us , Them }
 

Public Member Functions

 VerificationProcess (std::string ourUserId, std::string ourDeviceId, std::string theirUserId, std::string theirDeviceId, std::string ourDeviceKey)
 
bool finished () const
 
EventList processIncoming (Event e)
 Process an incoming event.
 
void addOutgoing (Event e)
 Add an outgoing event to the process.
 
void setTheirDeviceKey (std::string key)
 Set the device key of the other party.
 
EventList userReady ()
 Signal that the user is ready for an incoming verification.
 
EventList userCancel ()
 Signal that the user wants to cancel the verification.
 
EventList userConfirmMatch ()
 Signal that the user has confirmed that the codes match.
 
EventList userDenyMatch ()
 Signal that the user has noticed that the codes do not match.
 
EventList makeRequest (Timestamp now)
 Make an outgoing verification request to the other party.
 
std::string txnId () const
 Get the transaction id for this process.
 
Timestamp requestTimestamp () const
 Get the request timestamp for this process.
 

Public Attributes

std::string ourUserId
 
std::string ourDeviceId
 
std::string theirUserId
 
std::string theirDeviceId
 
immer::flex_vector< std::pair< Party, Event > > events
 A list of events that have been transmitted between the parties.
 
bool confirmedMatch {false}
 
std::string ourDeviceKey
 
std::string theirDeviceKey
 
SasDesc sas
 
VerificationProcessState state
 
SasDisplayCodes codes
 

Static Public Attributes

static const immer::flex_vector< std::string > supportedMethods = {"m.sas.v1"}
 
static const immer::flex_vector< std::string > supportedHashes = {"sha256"}
 
static const immer::flex_vector< std::string > supportedKeyAgreementProtocols = {"curve25519-hkdf-sha256"}
 
static const immer::flex_vector< std::string > supportedMessageAuthenticationCodes = {"hkdf-hmac-sha256.v2"}
 
static const immer::flex_vector< std::string > defaultShortAuthenticationString = {"emoji", "decimal"}
 

Member Enumeration Documentation

◆ Party

Enumerator
Us 
Them 

Constructor & Destructor Documentation

◆ VerificationProcess()

Kazv::VerificationProcess::VerificationProcess ( std::string  ourUserId,
std::string  ourDeviceId,
std::string  theirUserId,
std::string  theirDeviceId,
std::string  ourDeviceKey 
)

Member Function Documentation

◆ addOutgoing()

void Kazv::VerificationProcess::addOutgoing ( Event  e)

Add an outgoing event to the process.

◆ finished()

bool Kazv::VerificationProcess::finished ( ) const
Returns
Whether the process is finished.

◆ makeRequest()

EventList Kazv::VerificationProcess::makeRequest ( Timestamp  now)

Make an outgoing verification request to the other party.

◆ processIncoming()

EventList Kazv::VerificationProcess::processIncoming ( Event  e)

Process an incoming event.

◆ requestTimestamp()

Timestamp Kazv::VerificationProcess::requestTimestamp ( ) const

Get the request timestamp for this process.

◆ setTheirDeviceKey()

void Kazv::VerificationProcess::setTheirDeviceKey ( std::string  key)

Set the device key of the other party.

◆ txnId()

std::string Kazv::VerificationProcess::txnId ( ) const

Get the transaction id for this process.

◆ userCancel()

EventList Kazv::VerificationProcess::userCancel ( )

Signal that the user wants to cancel the verification.

◆ userConfirmMatch()

EventList Kazv::VerificationProcess::userConfirmMatch ( )

Signal that the user has confirmed that the codes match.

◆ userDenyMatch()

EventList Kazv::VerificationProcess::userDenyMatch ( )

Signal that the user has noticed that the codes do not match.

◆ userReady()

EventList Kazv::VerificationProcess::userReady ( )

Signal that the user is ready for an incoming verification.

Member Data Documentation

◆ codes

SasDisplayCodes Kazv::VerificationProcess::codes

◆ confirmedMatch

bool Kazv::VerificationProcess::confirmedMatch {false}

◆ defaultShortAuthenticationString

const immer::flex_vector<std::string> Kazv::VerificationProcess::defaultShortAuthenticationString = {"emoji", "decimal"}
inlinestatic

◆ events

immer::flex_vector<std::pair<Party, Event> > Kazv::VerificationProcess::events

A list of events that have been transmitted between the parties.

◆ ourDeviceId

std::string Kazv::VerificationProcess::ourDeviceId

◆ ourDeviceKey

std::string Kazv::VerificationProcess::ourDeviceKey

◆ ourUserId

std::string Kazv::VerificationProcess::ourUserId

◆ sas

SasDesc Kazv::VerificationProcess::sas

◆ state

VerificationProcessState Kazv::VerificationProcess::state

◆ supportedHashes

const immer::flex_vector<std::string> Kazv::VerificationProcess::supportedHashes = {"sha256"}
inlinestatic

◆ supportedKeyAgreementProtocols

const immer::flex_vector<std::string> Kazv::VerificationProcess::supportedKeyAgreementProtocols = {"curve25519-hkdf-sha256"}
inlinestatic

◆ supportedMessageAuthenticationCodes

const immer::flex_vector<std::string> Kazv::VerificationProcess::supportedMessageAuthenticationCodes = {"hkdf-hmac-sha256.v2"}
inlinestatic

◆ supportedMethods

const immer::flex_vector<std::string> Kazv::VerificationProcess::supportedMethods = {"m.sas.v1"}
inlinestatic

◆ theirDeviceId

std::string Kazv::VerificationProcess::theirDeviceId

◆ theirDeviceKey

std::string Kazv::VerificationProcess::theirDeviceKey

◆ theirUserId

std::string Kazv::VerificationProcess::theirUserId

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