我有简单的 RSA python 脚本:
import Crypto.PublicKey.RSA
import rsakey
from Crypto.PublicKey import pubkey
# Some global stuff
impl = Crypto.PublicKey.RSA.RSAImplementation(use_fast_math = True)
RSAObj = impl.construct(rsakey.RSAKeys)
def decrypt(encrypted):
return RSAObj.decrypt(encrypted)
当我尝试运行它时,我的 CLI 显示错误:
回溯(最后一次调用):
文件“otrsa.py”,第 6 行,在 impl = Crypto.PublicKey.RSA.RSAImplementation(use_fast_math = True) AttributeError: 'module' object has no attribute 'RSAImplementation'
我对 Python 真的很陌生,我不知道它是什么意思。我会感谢任何形式的帮助。