mirror of
https://github.com/pyrogram/pyrogram
synced 2025-08-28 04:48:06 +00:00
Update TgCrypto docs
This commit is contained in:
parent
c47fe4190a
commit
50d56f46d2
@ -35,9 +35,9 @@ Welcome to Pyrogram
|
||||
<img src="https://www.pyrogram.ml/images/scheme.svg"
|
||||
alt="Scheme Layer 75">
|
||||
</a>
|
||||
<a href="https://core.telegram.org/mtproto">
|
||||
<img src="https://www.pyrogram.ml/images/mtproto.svg"
|
||||
alt="MTProto v2.0">
|
||||
<a href="https://github.com/pyrogram/tgcrypto">
|
||||
<img src="https://www.pyrogram.ml/images/tgcrypto.svg"
|
||||
alt="TgCrypto">
|
||||
</a>
|
||||
</p>
|
||||
|
||||
@ -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:
|
||||
|
@ -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 <http://landinghub.visualstudio.com/visual-cpp-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 <https://t.me/PyrogramChat>`_.
|
||||
|
||||
.. _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.
|
32
docs/source/resources/TgCrypto.rst
Normal file
32
docs/source/resources/TgCrypto.rst
Normal file
@ -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 <http://landinghub.visualstudio.com/visual-cpp-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.
|
Loading…
x
Reference in New Issue
Block a user