From 842f5bfa88f4868275ace951a15cc6d2bf4e23cb Mon Sep 17 00:00:00 2001 From: painor Date: Thu, 1 Apr 2021 14:42:10 +0100 Subject: [PATCH] Add pyaesni support when found --- readthedocs/basic/installation.rst | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/readthedocs/basic/installation.rst b/readthedocs/basic/installation.rst index b9c8b399..faaa0727 100644 --- a/readthedocs/basic/installation.rst +++ b/readthedocs/basic/installation.rst @@ -49,14 +49,17 @@ The version number of the library should show in the output. Optional Dependencies ===================== -If cryptg_ is installed, **the library will work a lot faster**, since +If cryptg_ or pyaesni_ are installed, **the library will work a lot faster**, since encryption and decryption will be made in C instead of Python. If your code deals with a lot of updates or you are downloading/uploading a lot of files, you will notice a considerable speed-up (from a hundred kilobytes per second to several megabytes per second, if your connection allows it). -If it's not installed, pyaes_ will be used (which is pure Python, so it's +If none of them isinstalled, pyaes_ will be used (which is pure Python, so it's much slower). +pyaesni_ uses `AES instruction set`_ so you would need a processor that supports it. +Most 64bit processors support it by default so it shouldn't be a problem. + If pillow_ is installed, large images will be automatically resized when sending photos to prevent Telegram from failing with "invalid image". Official clients also do this. @@ -86,6 +89,8 @@ manually. Thanks to `@bb010g`_ for writing down this nice list. .. _cryptg: https://github.com/cher-nov/cryptg +.. _pyaesni: https://github.com/painor/pyaesni +.. _`AES instruction set`: https://en.wikipedia.org/wiki/AES_instruction_set .. _pyaes: https://github.com/ricmoo/pyaes .. _pillow: https://python-pillow.org .. _aiohttp: https://docs.aiohttp.org