2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-08-31 14:38:15 +00:00

Use base/random.h instead of openssl::RandomValue.

This commit is contained in:
John Preston
2021-09-15 13:21:45 +03:00
parent 52721847f4
commit 8069fdd873
57 changed files with 208 additions and 166 deletions

View File

@@ -15,6 +15,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
#include "data/data_document.h"
#include "data/data_document_media.h"
#include "base/platform/base_platform_info.h"
#include "base/random.h"
#include "ui/effects/animation_value.h"
#include "core/update_checker.h"
#include "core/file_location.h"
@@ -445,7 +446,7 @@ void writeSettings() {
FileWriteDescriptor settings(name, _basePath);
if (_settingsSalt.isEmpty() || !SettingsKey) {
_settingsSalt.resize(LocalEncryptSaltSize);
memset_rand(_settingsSalt.data(), _settingsSalt.size());
base::RandomFill(_settingsSalt.data(), _settingsSalt.size());
SettingsKey = CreateLegacyLocalKey(QByteArray(), _settingsSalt);
}
settings.writeData(_settingsSalt);