Get the largest GIL_MINSIZE value for the given cryptographic modules. The valid module names are the following: - _hashlib - _md5, _sha1, _sha2, _sha3, _blake2 - _hmac
(modules_names, default=2048)
| 829 | |
| 830 | |
| 831 | def find_gil_minsize(modules_names, default=2048): |
| 832 | """Get the largest GIL_MINSIZE value for the given cryptographic modules. |
| 833 | |
| 834 | The valid module names are the following: |
| 835 | |
| 836 | - _hashlib |
| 837 | - _md5, _sha1, _sha2, _sha3, _blake2 |
| 838 | - _hmac |
| 839 | """ |
| 840 | sizes = [] |
| 841 | for module_name in modules_names: |
| 842 | module = _import_module(module_name) |
| 843 | if module is not None: |
| 844 | sizes.append(getattr(module, '_GIL_MINSIZE', default)) |
| 845 | return max(sizes, default=default) |
| 846 | |
| 847 | |
| 848 | def _block_openssl_hash_new(blocked_name): |
nothing calls this directly
no test coverage detected
searching dependent graphs…