I am running a Python application on a standard AWS CentOS instance. When the code tries to call hashlib.pbkdf2_hmac it raises an AttributeError exception. The code is as below:
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))
I have run yum update
in the hopes of updating Python 2.7 to the latest version, but this hasn't helped. Any help on how to get hashlib.pbkdf2_hmac?