authentication.py 文件源码

python
阅读 38 收藏 0 点赞 0 评论 0

项目:zual 作者: ninadmhatre 项目源码 文件源码
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
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号