diff --git a/client/netwrapper.py b/client/netwrapper.py index d664b44..1d3b5a8 100644 --- a/client/netwrapper.py +++ b/client/netwrapper.py @@ -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': ''}