def METHOD_NAME(password, l):
    if len(password) < l:
        # padding
        password = password+chr(l-len(password)%l)*(l-len(password)%l)
    dk = hashlib.pbkdf2_hmac('sha256', bytes(password, 'utf-8'), bytes(SALT), 50000)
    return dk