password_string = 'password'.encode('utf16')
password_string = utf16tobin(password_string)
m1 = hashlib.sha1()
m1.update(binsalt + password_string)
if b64encode(m1.digest()) == b64hash:
    print('Logged in!')
else:
    print("Didn't match")
print(b64hash)
print(b64encode(m1.digest()))
Using Python to authenticate against raw username, hash, salt in DB created by ASP.NET roles/membership