GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | ||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | ||
GeezerVison is showing github.com — gh-85283: Build md5 extension with limited C API by vstinner · Pull Request #110967 · python/cpython 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. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
* Replace _Py_strhex() with few lines of code. * Replace _PyType_GetModuleState() with PyType_GetModuleState(). * Fix make check-c-globals
|
The vstinner@mona$ ./python Python 3.13.0a1+ (heads/limited_md5-dirty:417055ae80, Oct 17 2023, 12:28:44) [GCC 13.2.1 20231011 (Red Hat 13.2.1-4)] on linux Type "help", "copyright", "credits" or "license" for more information. >>> import _md5 >>> h1=_md5.md5(b'Python') >>> type(h1).__module__ '_md5' >>> import hashlib >>> h2=hashlib.new('md5', b'Python') >>> type(h2).__module__ '_hashlib' >>> h1.digest() == h2.digest() True hashlib uses the OpenSSL implementation of MD5. The |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
* 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.
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
There was an error while loading. Please reload this page.