2
0
mirror of https://github.com/kotatogram/kotatogram-desktop synced 2025-08-31 14:45:14 +00:00

Replaced rand_value util function with openssl::RandomValue.

This commit is contained in:
23rd
2021-01-24 01:34:40 +03:00
parent c90258664d
commit d4bbbdb65c
29 changed files with 106 additions and 54 deletions

View File

@@ -18,6 +18,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
#include "storage/localstorage.h"
#include "storage/localimageloader.h"
#include "storage/file_upload.h"
#include "base/openssl_help.h"
#include "base/parse_helper.h"
#include "base/zlib_help.h"
#include "base/unixtime.h"
@@ -476,7 +477,7 @@ SendMediaReady PrepareWallPaper(MTP::DcId dcId, const QImage &image) {
attributes.push_back(MTP_documentAttributeImageSize(
MTP_int(image.width()),
MTP_int(image.height())));
const auto id = rand_value<DocumentId>();
const auto id = openssl::RandomValue<DocumentId>();
const auto document = MTP_document(
MTP_flags(0),
MTP_long(id),