fix decode
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Torma Kristóf 2021-04-25 18:05:49 +02:00
parent a5490854af
commit 621c59dce2
Signed by: tormakris
GPG Key ID: DC83C4F2C41B1047
2 changed files with 3 additions and 3 deletions

View File

@ -13,7 +13,7 @@ from Crypto.PublicKey import RSA
from Crypto.PublicKey.RSA import RsaKey
auth_logger = logging.getLogger('AUTH APPLICATION ')
auth_logger.root.setLevel(logging.INFO)
auth_logger.setLevel(logging.INFO)
class Authetication:
ABSOLUTE_PATH = os.path.abspath(os.path.dirname(sys.argv[0]))

View File

@ -36,8 +36,8 @@ class NetWrapper:
cipher = PKCS1_OAEP.new(self.currentClientPublicKey)
identMsg = json.dumps(
{'type': 'IDY', 'source': self.network.own_addr,
'message': b64encode(cipher.encrypt(retmsg.encode('UTF-8')))}).decode(
'ASCII')
'message': b64encode(cipher.encrypt(retmsg.encode('UTF-8'))).decode('ASCII')}).encode(
'UTF-8')
self.network.send_msg(self.clientAddr, identMsg)
def sendMessage(self, message: bytes) -> None: