Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork32k
gh-85283: Build md5 extension with limited C API#110967
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
For now, I prefer to not add such function to the public C API, since users may want many variants:
See Include/internal/pycore_strhex.h: there are 4 functions with different arguments. |
* Replace _Py_strhex() with few lines of code.* Replace _PyType_GetModuleState() with PyType_GetModuleState().* Fix make check-c-globals
The vstinner@mona$ ./pythonPython3.13.0a1+ (heads/limited_md5-dirty:417055ae80,Oct172023,12:28:44) [GCC13.2.120231011 (RedHat13.2.1-4)]onlinuxType"help","copyright","credits"or"license"formoreinformation.>>>import_md5>>>h1=_md5.md5(b'Python')>>>type(h1).__module__'_md5'>>>importhashlib>>>h2=hashlib.new('md5',b'Python')>>>type(h2).__module__'_hashlib'>>>h1.digest()==h2.digest()True hashlib uses the OpenSSL implementation of MD5. The |
* Replace _Py_strhex() with few lines of code.* Replace _PyType_GetModuleState() with PyType_GetModuleState().* Fix make check-c-globals.
* Replace _Py_strhex() with few lines of code.* Replace _PyType_GetModuleState() with PyType_GetModuleState().* Fix make check-c-globals.
Uh oh!
There was an error while loading.Please reload this page.
📚 Documentation preview 📚:https://cpython-previews--110967.org.readthedocs.build/