0
我正在标准AWS CentOS实例上运行Python应用程序。当代码尝试调用hashlib.pbkdf2_hmac时,会引发AttributeError异常。代码如下:在AWS CentOS实例上未找到hashlib.pbkdf2_hmac
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))
我已经运行在更新的Python 2.7到最新版本的希望yum update
,但是这并没有帮助。有关如何获得hashlib.pbkdf2_hmac的帮助?
我会检查passlib。谢谢你的提示! – 2014-11-07 23:08:25