This commit is contained in:
parent
c63c516ab9
commit
9b5b1c9eb0
@ -33,8 +33,7 @@ class NetWrapper:
|
|||||||
cipher_rsa = PKCS1_OAEP.new(self.serverPubKey)
|
cipher_rsa = PKCS1_OAEP.new(self.serverPubKey)
|
||||||
identMsg = json.dumps(
|
identMsg = json.dumps(
|
||||||
{'type': 'IDY', 'source': self.network.own_addr, 'username': self.username,
|
{'type': 'IDY', 'source': self.network.own_addr, 'username': self.username,
|
||||||
##b64encode has to str
|
'message': b64encode(cipher_rsa.encrypt(randommsg.encode('UTF-8'))).decode()}).encode(
|
||||||
'message': str(b64encode(cipher_rsa.encrypt(randommsg.encode('UTF-8'))))}).encode(
|
|
||||||
'UTF-8')
|
'UTF-8')
|
||||||
self.network.send_msg(self.serverAddr, identMsg)
|
self.network.send_msg(self.serverAddr, identMsg)
|
||||||
returnJson = {'source': '', 'type': ''}
|
returnJson = {'source': '', 'type': ''}
|
||||||
|
Loading…
Reference in New Issue
Block a user