2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-08-31 06:26:18 +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

@@ -59,6 +59,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
#include "base/platform/base_platform_info.h"
#include "base/unixtime.h"
#include "base/call_delayed.h"
#include "base/openssl_help.h"
#include "facades.h" // Notify::switchInlineBotButtonReceived
#include "app.h"
#include "styles/style_boxes.h" // st::backgroundSize
@@ -2427,7 +2428,7 @@ PhotoData *Session::photoFromWeb(
return nullptr;
}
return photo(
rand_value<PhotoId>(),
openssl::RandomValue<PhotoId>(),
uint64(0),
QByteArray(),
base::unixtime::now(),
@@ -2692,7 +2693,7 @@ DocumentData *Session::documentFromWeb(
const ImageLocation &thumbnailLocation,
const ImageLocation &videoThumbnailLocation) {
const auto result = document(
rand_value<DocumentId>(),
openssl::RandomValue<DocumentId>(),
uint64(0),
QByteArray(),
base::unixtime::now(),
@@ -2714,7 +2715,7 @@ DocumentData *Session::documentFromWeb(
const ImageLocation &thumbnailLocation,
const ImageLocation &videoThumbnailLocation) {
const auto result = document(
rand_value<DocumentId>(),
openssl::RandomValue<DocumentId>(),
uint64(0),
QByteArray(),
base::unixtime::now(),