QXmppOmemoDeviceBundle Class
The QXmppOmemoDeviceBundle class represents an OMEMO bundle as defined by XEP-0384: OMEMO Encryption. More...
| Header: | #include <QXmppOmemoDeviceBundle_p.h> |
Public Functions
| void | addPublicPreKey(uint32_t id, const QByteArray &key) |
| QByteArray | publicIdentityKey() const |
| QHash<uint32_t, QByteArray> | publicPreKeys() const |
| void | removePublicPreKey(uint32_t id) |
| void | setPublicIdentityKey(const QByteArray &key) |
| void | setSignedPublicPreKey(const QByteArray &key) |
| void | setSignedPublicPreKeyId(uint32_t id) |
| void | setSignedPublicPreKeySignature(const QByteArray &signature) |
| QByteArray | signedPublicPreKey() const |
| uint32_t | signedPublicPreKeyId() const |
| QByteArray | signedPublicPreKeySignature() const |
Static Public Members
| bool | isOmemoDeviceBundle(const QDomElement &element) |
Detailed Description
It is a collection of publicly accessible data used by the X3DH key exchange. The data is used to build an encrypted session with an OMEMO device.
Member Function Documentation
void QXmppOmemoDeviceBundle::addPublicPreKey(uint32_t id, const QByteArray &key)
Adds a public pre key key with ID id.
The ID must be at least 1 and at most std::numeric_limits<int32_t>::max().
[static] bool QXmppOmemoDeviceBundle::isOmemoDeviceBundle(const QDomElement &element)
Determines whether the given DOM element is an OMEMO device bundle.
Returns true if element is an OMEMO device bundle, otherwise false.
QByteArray QXmppOmemoDeviceBundle::publicIdentityKey() const
Returns the public identity key.
The public identity key is the public long-term key which never changes.
See also setPublicIdentityKey().
QHash<uint32_t, QByteArray> QXmppOmemoDeviceBundle::publicPreKeys() const
Returns the public pre keys.
The key of a key-value pair represents the ID of the corresponding public pre key. The value of a key-value pair represents the public pre key.
void QXmppOmemoDeviceBundle::removePublicPreKey(uint32_t id)
Removes the public pre key with ID id.
void QXmppOmemoDeviceBundle::setPublicIdentityKey(const QByteArray &key)
Sets the public identity key to key.
See also publicIdentityKey().
void QXmppOmemoDeviceBundle::setSignedPublicPreKey(const QByteArray &key)
Sets the public pre key that is signed to key.
See also signedPublicPreKey().
void QXmppOmemoDeviceBundle::setSignedPublicPreKeyId(uint32_t id)
Sets the ID of the public pre key that is signed to id.
The ID must be at least 1 and at most std::numeric_limits<int32_t>::max().
See also signedPublicPreKeyId().
void QXmppOmemoDeviceBundle::setSignedPublicPreKeySignature(const QByteArray &signature)
Sets the signature of the public pre key that is signed.
See also signedPublicPreKeySignature().
QByteArray QXmppOmemoDeviceBundle::signedPublicPreKey() const
Returns the public pre key that is signed.
See also setSignedPublicPreKey().
uint32_t QXmppOmemoDeviceBundle::signedPublicPreKeyId() const
Returns the ID of the public pre key that is signed.
The ID is 0 if it is unset.
See also setSignedPublicPreKeyId().
QByteArray QXmppOmemoDeviceBundle::signedPublicPreKeySignature() const
Returns the signature of the public pre key that is signed.
See also setSignedPublicPreKeySignature().