def authenticate(u, p):
if u and p:
if u in (current_app.config['ADMIN_MAIL'],):
p_salt = p + current_app.config["SECRET_KEY"]
e_salt = chaabi + current_app.config["SECRET_KEY"]
d = hashlib.sha384()
e = hashlib.sha384()
d.update(p_salt.encode())
e.update(e_salt.encode())
return d.hexdigest() == e.hexdigest()
else:
return False
else:
return False
评论列表
文章目录