def get_encrypted_pw(self,data):
"""
??????
"""
rsa_e = 65537 #0x10001
pw_string = str(data['servertime']) + '\t' + str(data['nonce']) + '\n' + str(self.password)
key = rsa.PublicKey(int(data['pubkey'],16),rsa_e)
pw_encypted = rsa.encrypt(pw_string.encode('utf-8'), key)
self.password = '' #??password
passwd = binascii.b2a_hex(pw_encypted)
self.log.info("Password compilation completed...")
# print(passwd)
return passwd
评论列表
文章目录