helpers.py 文件源码

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

项目:BitBot 作者: crack00r 项目源码 文件源码
def get_password_hash(pw, current_salt):
    """Gets the password hash for the two-step verification.
       current_salt should be the byte array provided by invoking GetPasswordRequest()"""

    # Passwords are encoded as UTF-8
    # At https://github.com/DrKLO/Telegram/blob/e31388
    # src/main/java/org/telegram/ui/LoginActivity.java#L2003
    data = pw.encode('utf-8')

    pw_hash = current_salt + data + current_salt
    return sha256(pw_hash).digest()

# endregion
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号