libQuotient
A Qt library for building matrix clients
Quotient::SignedOneTimeKey Class Reference

#include <e2ee_common.h>

Public Member Functions

 SignedOneTimeKey (const QString &unsignedKey, const QString &userId, const QString &deviceId, const QByteArray &signature)
 
 SignedOneTimeKey (const QJsonObject &jo={})
 
QByteArray key () const
 Unpadded Base64-encoded 32-byte Curve25519 public key. More...
 
auto signatures () const
 Signatures of the key object. More...
 
QByteArray signature (QStringView userId, QStringView deviceId) const
 
bool isFallback () const
 Whether the key is a fallback key. More...
 
auto toJson () const
 
auto toJsonForVerification () const
 

Detailed Description

Definition at line 334 of file e2ee_common.h.

Constructor & Destructor Documentation

◆ SignedOneTimeKey() [1/2]

Quotient::SignedOneTimeKey::SignedOneTimeKey ( const QString &  unsignedKey,
const QString &  userId,
const QString &  deviceId,
const QByteArray &  signature 
)
inlineexplicit

Definition at line 336 of file e2ee_common.h.

◆ SignedOneTimeKey() [2/2]

Quotient::SignedOneTimeKey::SignedOneTimeKey ( const QJsonObject &  jo = {})
inlineexplicit

Definition at line 347 of file e2ee_common.h.

Member Function Documentation

◆ isFallback()

bool Quotient::SignedOneTimeKey::isFallback ( ) const
inline

Whether the key is a fallback key.

Definition at line 372 of file e2ee_common.h.

◆ key()

QByteArray Quotient::SignedOneTimeKey::key ( ) const
inline

Unpadded Base64-encoded 32-byte Curve25519 public key.

Definition at line 352 of file e2ee_common.h.

◆ signature()

QByteArray Quotient::SignedOneTimeKey::signature ( QStringView  userId,
QStringView  deviceId 
) const
inline

Definition at line 364 of file e2ee_common.h.

◆ signatures()

auto Quotient::SignedOneTimeKey::signatures ( ) const
inline

Signatures of the key object.

The signature is calculated using the process described at https://spec.matrix.org/v1.3/appendices/#signing-json

Definition at line 358 of file e2ee_common.h.

◆ toJson()

auto Quotient::SignedOneTimeKey::toJson ( ) const
inline

Definition at line 373 of file e2ee_common.h.

◆ toJsonForVerification()

auto Quotient::SignedOneTimeKey::toJsonForVerification ( ) const
inline

Definition at line 374 of file e2ee_common.h.


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