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 305 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 307 of file e2ee_common.h.

◆ SignedOneTimeKey() [2/2]

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

Definition at line 318 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 343 of file e2ee_common.h.

◆ key()

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

Unpadded Base64-encoded 32-byte Curve25519 public key.

Definition at line 323 of file e2ee_common.h.

◆ signature()

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

Definition at line 335 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 329 of file e2ee_common.h.

◆ toJson()

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

Definition at line 344 of file e2ee_common.h.

◆ toJsonForVerification()

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

Definition at line 345 of file e2ee_common.h.


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