From 6f885c41d94b55573cfb072eafa3dbbf869681e8 Mon Sep 17 00:00:00 2001 From: levlam Date: Sun, 17 May 2020 17:07:16 +0300 Subject: [PATCH] Rename crypto to RSA. GitOrigin-RevId: 4c15f44c0d5c618933b7c1aecb3580664a15a557 --- CMakeLists.txt | 4 ++-- td/mtproto/Handshake.cpp | 1 - td/mtproto/Handshake.h | 2 +- td/mtproto/{crypto.cpp => RSA.cpp} | 3 +-- td/mtproto/{crypto.h => RSA.h} | 2 -- td/telegram/ConfigManager.cpp | 2 +- td/telegram/Td.cpp | 2 +- td/telegram/net/PublicRsaKeyShared.h | 2 +- td/telegram/net/PublicRsaKeyWatchdog.cpp | 2 +- td/telegram/net/Session.cpp | 2 +- test/mtproto.cpp | 2 +- 11 files changed, 10 insertions(+), 14 deletions(-) rename td/mtproto/{crypto.cpp => RSA.cpp} (98%) rename td/mtproto/{crypto.h => RSA.h} (95%) diff --git a/CMakeLists.txt b/CMakeLists.txt index 6a4c6ecea..161c456a9 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -356,7 +356,6 @@ set(TL_DOTNET_SCHEME_SOURCE set(TDLIB_SOURCE td/mtproto/AuthData.cpp - td/mtproto/crypto.cpp td/mtproto/DhHandshake.cpp td/mtproto/Handshake.cpp td/mtproto/HandshakeActor.cpp @@ -367,6 +366,7 @@ set(TDLIB_SOURCE td/mtproto/PingConnection.cpp td/mtproto/ProxySecret.cpp td/mtproto/RawConnection.cpp + td/mtproto/RSA.cpp td/mtproto/SessionConnection.cpp td/mtproto/TcpTransport.cpp td/mtproto/TlsInit.cpp @@ -494,7 +494,6 @@ set(TDLIB_SOURCE td/mtproto/AuthData.h td/mtproto/AuthKey.h - td/mtproto/crypto.h td/mtproto/CryptoStorer.h td/mtproto/DhHandshake.h td/mtproto/Handshake.h @@ -511,6 +510,7 @@ set(TDLIB_SOURCE td/mtproto/ProxySecret.h td/mtproto/Query.h td/mtproto/RawConnection.h + td/mtproto/RSA.h td/mtproto/SessionConnection.h td/mtproto/TcpTransport.h td/mtproto/TlsInit.h diff --git a/td/mtproto/Handshake.cpp b/td/mtproto/Handshake.cpp index eb56e1b76..4563268a2 100644 --- a/td/mtproto/Handshake.cpp +++ b/td/mtproto/Handshake.cpp @@ -6,7 +6,6 @@ // #include "td/mtproto/Handshake.h" -#include "td/mtproto/crypto.h" #include "td/mtproto/KDF.h" #include "td/mtproto/utils.h" diff --git a/td/mtproto/Handshake.h b/td/mtproto/Handshake.h index 46f0c69c8..9669cb4c1 100644 --- a/td/mtproto/Handshake.h +++ b/td/mtproto/Handshake.h @@ -7,8 +7,8 @@ #pragma once #include "td/mtproto/AuthKey.h" -#include "td/mtproto/crypto.h" #include "td/mtproto/DhHandshake.h" +#include "td/mtproto/RSA.h" #include "td/utils/buffer.h" #include "td/utils/Slice.h" diff --git a/td/mtproto/crypto.cpp b/td/mtproto/RSA.cpp similarity index 98% rename from td/mtproto/crypto.cpp rename to td/mtproto/RSA.cpp index 905228cfc..a5825c2a6 100644 --- a/td/mtproto/crypto.cpp +++ b/td/mtproto/RSA.cpp @@ -4,7 +4,7 @@ // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // -#include "td/mtproto/crypto.h" +#include "td/mtproto/RSA.h" #include "td/mtproto/mtproto_api.h" @@ -25,7 +25,6 @@ namespace td { -/*** RSA ***/ RSA::RSA(BigNum n, BigNum e) : n_(std::move(n)), e_(std::move(e)) { } diff --git a/td/mtproto/crypto.h b/td/mtproto/RSA.h similarity index 95% rename from td/mtproto/crypto.h rename to td/mtproto/RSA.h index 7d3f35d93..68ea42b73 100644 --- a/td/mtproto/crypto.h +++ b/td/mtproto/RSA.h @@ -15,7 +15,6 @@ namespace td { -/*** RSA ***/ class RSA { public: RSA clone() const; @@ -33,7 +32,6 @@ class RSA { BigNum e_; }; -/*** PublicRsaKeyInterface ***/ class PublicRsaKeyInterface { public: virtual ~PublicRsaKeyInterface() = default; diff --git a/td/telegram/ConfigManager.cpp b/td/telegram/ConfigManager.cpp index a1dddae63..5ff78b36b 100644 --- a/td/telegram/ConfigManager.cpp +++ b/td/telegram/ConfigManager.cpp @@ -27,8 +27,8 @@ #include "td/mtproto/AuthData.h" #include "td/mtproto/AuthKey.h" -#include "td/mtproto/crypto.h" #include "td/mtproto/RawConnection.h" +#include "td/mtproto/RSA.h" #include "td/mtproto/TransportType.h" #include "td/net/HttpQuery.h" diff --git a/td/telegram/Td.cpp b/td/telegram/Td.cpp index 341181bf5..93c896f13 100644 --- a/td/telegram/Td.cpp +++ b/td/telegram/Td.cpp @@ -99,11 +99,11 @@ #include "td/db/binlog/BinlogEvent.h" -#include "td/mtproto/crypto.h" #include "td/mtproto/DhHandshake.h" #include "td/mtproto/Handshake.h" #include "td/mtproto/HandshakeActor.h" #include "td/mtproto/RawConnection.h" +#include "td/mtproto/RSA.h" #include "td/mtproto/TransportType.h" #include "td/utils/buffer.h" diff --git a/td/telegram/net/PublicRsaKeyShared.h b/td/telegram/net/PublicRsaKeyShared.h index efab08534..6aafb92d0 100644 --- a/td/telegram/net/PublicRsaKeyShared.h +++ b/td/telegram/net/PublicRsaKeyShared.h @@ -8,7 +8,7 @@ #include "td/telegram/net/DcId.h" -#include "td/mtproto/crypto.h" +#include "td/mtproto/RSA.h" #include "td/utils/common.h" #include "td/utils/port/RwMutex.h" diff --git a/td/telegram/net/PublicRsaKeyWatchdog.cpp b/td/telegram/net/PublicRsaKeyWatchdog.cpp index 25b96c44e..204610460 100644 --- a/td/telegram/net/PublicRsaKeyWatchdog.cpp +++ b/td/telegram/net/PublicRsaKeyWatchdog.cpp @@ -12,7 +12,7 @@ #include "td/telegram/telegram_api.h" -#include "td/mtproto/crypto.h" +#include "td/mtproto/RSA.h" #include "td/utils/logging.h" #include "td/utils/Time.h" diff --git a/td/telegram/net/Session.cpp b/td/telegram/net/Session.cpp index aa9bd034e..c3b851b25 100644 --- a/td/telegram/net/Session.cpp +++ b/td/telegram/net/Session.cpp @@ -18,11 +18,11 @@ #include "td/telegram/StateManager.h" #include "td/telegram/UniqueId.h" -#include "td/mtproto/crypto.h" #include "td/mtproto/DhHandshake.h" #include "td/mtproto/Handshake.h" #include "td/mtproto/HandshakeActor.h" #include "td/mtproto/RawConnection.h" +#include "td/mtproto/RSA.h" #include "td/mtproto/SessionConnection.h" #include "td/mtproto/TransportType.h" diff --git a/test/mtproto.cpp b/test/mtproto.cpp index 0e9648a97..cd126a758 100644 --- a/test/mtproto.cpp +++ b/test/mtproto.cpp @@ -10,7 +10,6 @@ #include "td/actor/PromiseFuture.h" #include "td/mtproto/AuthData.h" -#include "td/mtproto/crypto.h" #include "td/mtproto/DhHandshake.h" #include "td/mtproto/Handshake.h" #include "td/mtproto/HandshakeActor.h" @@ -18,6 +17,7 @@ #include "td/mtproto/PingConnection.h" #include "td/mtproto/ProxySecret.h" #include "td/mtproto/RawConnection.h" +#include "td/mtproto/RSA.h" #include "td/mtproto/TlsInit.h" #include "td/mtproto/TransportType.h"