With Both PKCS1_OAEP and Hash
from Crypto.Cipher import PKCS1_OAEP
from Crypto import Hash
Hash.MD5
That code works without issue.
With Just Hash
from Crypto import Hash
Hash.MD5
That code gives me the following error:
Traceback (most recent call last):
File "test.py", line 3, in <module>
Hash.MD5
AttributeError: module 'Crypto.Hash' has no attribute 'MD5'
With Just PKCS1_OAEP
This doesn’t work either:
from Crypto.Cipher import PKCS1_OAEP
Hash.MD5
That gives this error:
Traceback (most recent call last):
File "test.py", line 3, in <module>
Hash.MD5
NameError: name 'Hash' is not defined
I feel like it ought to work with just from Crypto import Hash
but that’s clearly not the case. Any ideas?
(I’m running Python 3.8.3)