def encrypt_password(raw_password, algorithm='sha1', salt=None):
    """
    Returns a string of the hexdigest of the given plaintext password and salt
    using the given algorithm ('md5', 'sha1' or other supported by hashlib).
    """
    if salt 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/operator `+` -> `*`