2021-05-12 12:50:52 +00:00
|
|
|
/*
|
|
|
|
* Created by victoria on 2021-05-12.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include "device_key_storage.h"
|
|
|
|
#include <QRandomGenerator>
|
|
|
|
|
|
|
|
int QXmpp::Omemo::DeviceKeyStorage::generateDeviceId() {
|
2021-05-13 14:54:37 +00:00
|
|
|
QRandomGenerator random{};
|
2021-05-12 12:50:52 +00:00
|
|
|
|
2021-05-13 14:54:37 +00:00
|
|
|
return 1 + random.bounded(INT32_MAX - 1);
|
2021-05-12 12:50:52 +00:00
|
|
|
}
|
|
|
|
|
2021-05-13 14:54:37 +00:00
|
|
|
QXmpp::Omemo::DeviceKeyStorage::DeviceKeyStorage(int deviceId) : deviceId(deviceId) {}
|