def hash(s): return hash(s)
def login(s): pw = request.form["pass"] # print("comparing passwords",hash(pw),s['pass']) if hash(pw) == s["pass"]: s.loggedin = True s.setstate("loggedin")
from betterhash import bhash as hash print(hash("1234"))
def register(s): s["pass"] = hash(request.form["pass"]) s.loggedin = True s.setstate("loggedin")
def hash(s): return hash(json.dumps(s.to_dict(),indent=2,sort_keys=True))