import hashlib
import binascii


def make_password(raw_password, salt, iterations=100000, hash_name='sha256'):
    """
        Secure password hashing using the PBKDF2 algorithm (recommended)
        Configured to use PBKDF2 + HMAC + SHA256.
        The result is a 64 byte binary string.  Iterations may be changed
        safely but you must rename the algorithm if you change SHA256.
    """
    dk = hashlib.pbkdf2_hmac(password=raw_password.encode('utf-8'),
                             salt=salt.encode('utf-8'),
                             iterations=iterations,
                             hash_name=hash_name)
    return binascii.hexlify(dk).decode('ascii')