diff --git a/docs/source/index.rst b/docs/source/index.rst index 45fc483f..9c27bc22 100644 --- a/docs/source/index.rst +++ b/docs/source/index.rst @@ -35,9 +35,9 @@ Welcome to Pyrogram Scheme Layer 75 - - MTProto v2.0 + + TgCrypto

@@ -64,7 +64,7 @@ Features a reliable connection. - **Fast**: Pyrogram's speed is boosted up by `TgCrypto`_, a high-performance, easy-to-install - crypto library written in C. + Telegram Crypto Library written in C as a Python extension. - **Updated**: Pyrogram makes use of the latest Telegram API version, currently `Layer 75`_. @@ -108,7 +108,7 @@ To get started, press Next. resources/ErrorHandling resources/SOCKS5Proxy resources/AutoAuthorization - resources/FastCrypto + resources/TgCrypto .. toctree:: :hidden: diff --git a/docs/source/resources/FastCrypto.rst b/docs/source/resources/FastCrypto.rst deleted file mode 100644 index 0cefd146..00000000 --- a/docs/source/resources/FastCrypto.rst +++ /dev/null @@ -1,37 +0,0 @@ -Fast Crypto -=========== - -Pyrogram's speed can be *dramatically* boosted up by installing TgCrypto_, a high-performance, easy-to-install crypto -library specifically written in C for Pyrogram [#f1]_. TgCrypto is a replacement for the painfully slow PyAES and -implements the crypto algorithms MTProto requires, namely AES-IGE and AES-CTR 256 bit. - -Installation ------------- - -.. code-block:: bash - - $ pip install --upgrade tgcrypto - - -.. note:: Being a C extension for Python, TgCrypto is an optional but *highly recommended* dependency; when TgCrypto - is not detected on your system, Pyrogram will automatically fall back to PyAES and will show you a warning. - -The reason about being an optional package is that TgCrypto requires some extra system tools in order to be compiled. -Usually the errors you receive when trying to install TgCrypto are enough to understand what you should do next. - -- **Windows**: Install `Visual C++ 2015 Build Tools `_. - -- **macOS**: A pop-up will automatically ask you to install the command line developer tools as soon as you issue the - installation command. - -- **Linux**: Depending on your distro, install a proper C compiler (``gcc``, ``clang``) and the Python header files - (``python3-dev``). - -- **Termux (Android)**: Install ``clang`` and ``python-dev`` packages. - -More help on the `Pyrogram group chat `_. - -.. _TgCrypto: https://github.com/pyrogram/tgcrypto - -.. [#f1] Although TgCrypto is intended for Pyrogram, it is shipped as a standalone package and can thus be used for - other projects too. \ No newline at end of file diff --git a/docs/source/resources/TgCrypto.rst b/docs/source/resources/TgCrypto.rst new file mode 100644 index 00000000..64759b9b --- /dev/null +++ b/docs/source/resources/TgCrypto.rst @@ -0,0 +1,32 @@ +TgCrypto +======== + +Pyrogram's speed can be *dramatically* boosted up by TgCrypto_, a high-performance, easy-to-install Telegram Crypto +Library specifically written in C for Pyrogram [#f1]_ as a Python extension. + +TgCrypto is a replacement for the much slower PyAES and implements the crypto algorithms Telegram requires, namely +**AES-IGE 256 bit** (used in MTProto v2.0) and **AES-CTR 256 bit** (used for CDN encrypted files). + +Installation +------------ + +.. code-block:: bash + + $ pip install --upgrade tgcrypto + +.. note:: Being a C extension for Python, TgCrypto is an optional but *highly recommended* dependency; when TgCrypto is + not detected in your system, Pyrogram will automatically fall back to PyAES and will show you a warning. + +The reason about being an optional package is that TgCrypto requires some extra system tools in order to be compiled. +The errors you receive when trying to install TgCrypto are system dependent, but also descriptive enough to understand +what you should do next: + +- **Windows**: Install `Visual C++ 2015 Build Tools `_. +- **macOS**: A pop-up will automatically ask you to install the command line developer tools. +- **Linux**: Install a proper C compiler (``gcc``, ``clang``) and the Python header files (``python3-dev``). +- **Termux (Android)**: Install ``clang`` and ``python-dev`` packages. + +.. _TgCrypto: https://github.com/pyrogram/tgcrypto + +.. [#f1] Although TgCrypto is intended for Pyrogram, it is shipped as a standalone package and can thus be used for + other Python projects too.