Closed tholzheim closed 2 years ago
@tholzheim thank you for the hint.
Does pycryptodome have compatible functionality? The reason to use pycrypto was that the encryption is compatible with the Java Encryption library used by https://github.com/WolfgangFahl/Mediawiki-Japi see https://github.com/WolfgangFahl/Mediawiki-Japi/blob/master/src/main/java/com/bitplan/mediawiki/japi/user/Crypt.java and the import references there.
Changing the algorithm would potentially mean to change all existing .ini files which are out there - so that at least a transition period using both libraries/algorithms might be needed. If the library has compatible encryption we are fine. I also saw that https://pypi.org/project/pycrypto-yb/ was started last year but seems to be undocumented and unfortunately in alpha state. Contacting Author: Dwayne C. Litzenberger in this matter directly might help to clarify the state of affairs.
https://pypi.org/user/dlitz/ and https://www.dlitz.net/software/pycrypto/ and https://www.linkedin.com/in/dlitz/?originalSubdomain=ca are direct pointers to him.
I cannot reinstall the package using pip as the pycrypto dependency produces this error:
Error: warning: GMP or MPIR library not found;
Not building Crypto.PublicKey._fastm ath. building 'Crypto.Random.OSRNG.winrandom' extension error:
Microsoft Visual C++ 14.0 is required.
Get it with "Microsoft Visual C++ Build Tools": https://visualstudio.microsoft.com/downloads/
Even though I installed Microsoft Visual C++ 14.0, It is still failing.
Searching for the error message got me here: https://www.gitmemory.com/issue/dlitz/pycrypto/287/501514454.
Did you try the Linux subsystem for Windows 10?
@WolfgangFahl unfortunately I'm running on Windows 8.
That is good to know since the minimum requirement is Python 3.5 + and a current OS anyway. Our CI doesn't check for anything other. See https://github.com/WolfgangFahl/py-3rdparty-mediawiki/actions/runs/572169123 for your choice of 12 supported combinations.
testCrypt test fails with
TypeError: Object type <class 'str'> cannot be passed to C code
The library pycrypto is discontinued. The fork pycryptodome seems to be a good alternative which is actively maintained.