2
0
mirror of https://github.com/kotatogram/kotatogram-desktop synced 2025-09-01 07:05:13 +00:00

Move some modules to lib_mtproto.

This commit is contained in:
John Preston
2019-11-18 12:28:14 +03:00
parent 782025a0a6
commit cfe12f773f
53 changed files with 143 additions and 148 deletions

View File

@@ -58,12 +58,6 @@ static_assert(sizeof(MTPdouble) == 8, "Basic types size check failed");
static_assert(sizeof(int) >= 4, "Basic types size check failed");
namespace {
std::atomic<int> GlobalAtomicRequestId = 0;
} // namespace
// Precise timing functions / rand init
struct CRYPTO_dynlock_value {
@@ -206,14 +200,6 @@ namespace ThirdParty {
}
}
int GetNextRequestId() {
const auto result = ++GlobalAtomicRequestId;
if (result == std::numeric_limits<int>::max() / 2) {
GlobalAtomicRequestId = 0;
}
return result;
}
int32 *hashSha1(const void *data, uint32 len, void *dest) {
return (int32*)SHA1((const uchar*)data, (size_t)len, (uchar*)dest);
}