2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-09-01 15:05:56 +00:00

Replace str_const with base::const_string.

This commit is contained in:
John Preston
2020-01-29 12:44:37 +03:00
parent c03df169b3
commit 74d848311b
18 changed files with 89 additions and 114 deletions

View File

@@ -24,7 +24,7 @@ namespace {
constexpr auto kSendNextTimeout = crl::time(800);
constexpr auto kPublicKey = str_const("\
constexpr auto kPublicKey = "\
-----BEGIN RSA PUBLIC KEY-----\n\
MIIBCgKCAQEAyr+18Rex2ohtVy8sroGPBwXD3DOoKCSpjDqYoXgCqB7ioln4eDCF\n\
fOBUlfXUEvM/fnKCpF46VkAftlb4VuPDeQSS/ZxZYEGqHaywlroVnXHIjgqoxiAd\n\
@@ -33,7 +33,7 @@ fOBUlfXUEvM/fnKCpF46VkAftlb4VuPDeQSS/ZxZYEGqHaywlroVnXHIjgqoxiAd\n\
fDK/NWcvGqa0w/nriMD6mDjKOryamw0OP9QuYgMN0C9xMW9y8SmP4h92OAWodTYg\n\
Y1hZCxdv6cs5UnW9+PWvS+WIbkh+GaWYxwIDAQAB\n\
-----END RSA PUBLIC KEY-----\
");
"_cs;
const auto kRemoteProject = "peak-vista-421";
const auto kFireProject = "reserve-5a846";
@@ -436,9 +436,7 @@ bool SpecialConfigRequest::decryptSimpleConfig(const QByteArray &bytes) {
return false;
}
auto publicKey = details::RSAPublicKey(bytes::make_span(
kPublicKey.c_str(),
kPublicKey.size()));
auto publicKey = details::RSAPublicKey(bytes::make_span(kPublicKey));
auto decrypted = publicKey.decrypt(bytes::make_span(decodedBytes));
auto decryptedBytes = gsl::make_span(decrypted);