QXmpp::E2ee Namespace

namespace QXmpp::E2ee
Header: #include <QXmppGlobal.h>
Since: QXmpp 1.18

Classes

(since QXmpp 1.18) class Providers

Types

(since QXmpp 1.18) enum class ContentEncryption { Sce, BodyOnly }

Variables

(since QXmpp 1.18) const QStringView LegacyOpenPgp
(since QXmpp 1.18) const QStringView Omemo0
(since QXmpp 1.18) const QStringView Omemo1
(since QXmpp 1.18) const QStringView Omemo2
(since QXmpp 1.18) const QStringView Otr
(since QXmpp 1.18) const QStringView Ox

Functions

(since QXmpp 1.18) QStringView fromMethod(QXmpp::EncryptionMethod method)
(since QXmpp 1.18) QString name(QStringView encryption)
(since QXmpp 1.18) QXmpp::EncryptionMethod toMethod(QStringView encryption)

Detailed Description

End-to-end encryptions are identified by their namespace (XEP-0380: Explicit Message Encryption), which is also the namespace of the element containing the encrypted content. Encryptions not known to QXmpp can be added by extensions using their own namespace.

Classes

class Providers

Type Documentation

[since QXmpp 1.18] enum class E2ee::ContentEncryption

What an end-to-end encryption encrypts of a message.

ConstantValueDescription
QXmpp::E2ee::ContentEncryption::Sce0All sensitive elements are encrypted via XEP-0420: Stanza Content Encryption (SCE), e.g. by OMEMO 2.
QXmpp::E2ee::ContentEncryption::BodyOnly1Only the body is encrypted, e.g. by OMEMO 0. Other elements are sent in the clear, so they are not protected and can be added or changed by anyone on the path, e.g. a server.

This enum was introduced in QXmpp 1.18.

Variable Documentation

[since QXmpp 1.18] const QStringView E2ee::LegacyOpenPgp

XEP-0027: Current Jabber OpenPGP Usage

This variable was introduced in QXmpp 1.18.

[since QXmpp 1.18] const QStringView E2ee::Omemo0

XEP-0384: OMEMO Encryption

This variable was introduced in QXmpp 1.18.

[since QXmpp 1.18] const QStringView E2ee::Omemo1

XEP-0384: OMEMO Encryption

since version 0.4

This variable was introduced in QXmpp 1.18.

[since QXmpp 1.18] const QStringView E2ee::Omemo2

XEP-0384: OMEMO Encryption

since version 0.8

This variable was introduced in QXmpp 1.18.

[since QXmpp 1.18] const QStringView E2ee::Otr

XEP-0364: Current Off-the-Record Messaging Usage

This variable was introduced in QXmpp 1.18.

[since QXmpp 1.18] const QStringView E2ee::Ox

XEP-0373: OpenPGP for XMPP

This variable was introduced in QXmpp 1.18.

Function Documentation

[since QXmpp 1.18] QStringView E2ee::fromMethod(QXmpp::EncryptionMethod method)

Returns the namespace of the end-to-end encryption method, e.g. QXmpp::E2ee::Omemo2 for QXmpp::Omemo2, or an empty string for QXmpp::NoEncryption and QXmpp::UnknownEncryption.

This function was introduced in QXmpp 1.18.

[since QXmpp 1.18] QString E2ee::name(QStringView encryption)

Returns the name of the end-to-end encryption given by its namespace as shown to users, e.g. "OMEMO 2" for QXmpp::E2ee::Omemo2, or an empty string if the encryption is not known to QXmpp.

It can be used for messages that could not be decrypted, which do not always announce the name of their encryption themselves (see QXmppMessage::encryptionName()).

This function was introduced in QXmpp 1.18.

[since QXmpp 1.18] QXmpp::EncryptionMethod E2ee::toMethod(QStringView encryption)

Returns the end-to-end encryption method of the encryption given by its namespace, e.g. QXmpp::Omemo2 for QXmpp::E2ee::Omemo2.

An empty namespace results in QXmpp::NoEncryption and a namespace of an encryption not known to QXmpp in QXmpp::UnknownEncryption.

It can be used to store the encryption as a number, e.g. the one of a sent message reported by QXmpp::Messages::Sent::encryption().

This function was introduced in QXmpp 1.18.