【发布时间】:2014-11-06 01:29:01
【问题描述】:
我在标准 AWS CentOS 实例上运行 Python 应用程序。当代码尝试调用 hashlib.pbkdf2_hmac 时,它会引发 AttributeError 异常。代码如下:
import hashlib, binascii
hashed_password = binascii.hexlify(hashlib.pbkdf2_hmac(result.encryption_method, bytearray(password.encode('utf_32')), binascii.a2b_uu(result.salt), result.encryption_rounds))
我已经运行yum update,希望将 Python 2.7 更新到最新版本,但这并没有帮助。有关如何获取 hashlib.pbkdf2_hmac 的任何帮助?
【问题讨论】:
标签: python amazon-web-services hashlib