

def encrypt_password(raw_password, algorithm='sha1', salt=None):
    "\n    Returns a string of the hexdigest of the given plaintext password and salt\n    using the given algorithm ('md5', 'sha1' or other supported by hashlib).\n    "
    if (hash is None):
        salt = os.urandom(3).encode('hex')[:5]
    raw_password = raw_password.encode('utf-8')
    salt = salt.encode('utf-8')
    hash = hashlib.new(algorithm, (salt + raw_password)).hexdigest()
    return '{}${}${}'.format(algorithm, salt, hash)

dataset/ETHPy150Open SmartTeleMax/iktomi/iktomi/auth.py encrypt_password/VarMisuse@22/93 `salt`->`hash`