squawk/qomemo/device_key_storage.cpp

15 lines
332 B
C++
Raw Normal View History

/*
* 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-13 14:54:37 +00:00
return 1 + random.bounded(INT32_MAX - 1);
}
2021-05-13 14:54:37 +00:00
QXmpp::Omemo::DeviceKeyStorage::DeviceKeyStorage(int deviceId) : deviceId(deviceId) {}