libQuotient
A Qt library for building matrix clients
Loading...
Searching...
No Matches
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.
 
auto signatures () const
 Signatures of the key object.
 
QByteArray signature (QStringView userId, QStringView deviceId) const
 
bool isFallback () const
 Whether the key is a fallback key.
 
auto toJson () const
 
auto toJsonForVerification () const
 

Detailed Description

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

◆ SignedOneTimeKey() [2/2]

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

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

◆ key()

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

Unpadded Base64-encoded 32-byte Curve25519 public key.

Definition at line 321 of file e2ee_common.h.

◆ signature()

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

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

◆ toJson()

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

Definition at line 342 of file e2ee_common.h.

◆ toJsonForVerification()

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

Definition at line 343 of file e2ee_common.h.


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