message.decode()
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
DESKTOP-DPA61F8\Benedek 2021-04-25 17:01:09 +02:00
parent c63c516ab9
commit 9b5b1c9eb0

View File

@ -33,8 +33,7 @@ class NetWrapper:
cipher_rsa = PKCS1_OAEP.new(self.serverPubKey)
identMsg = json.dumps(
{'type': 'IDY', 'source': self.network.own_addr, 'username': self.username,
##b64encode has to str
'message': str(b64encode(cipher_rsa.encrypt(randommsg.encode('UTF-8'))))}).encode(
'message': b64encode(cipher_rsa.encrypt(randommsg.encode('UTF-8'))).decode()}).encode(
'UTF-8')
self.network.send_msg(self.serverAddr, identMsg)
returnJson = {'source': '', 'type': ''}