This commit is contained in:
		| @@ -73,7 +73,8 @@ class NetWrapper: | |||||||
|         nonce = b64encode(cipher.nonce).decode('UTF-8') |         nonce = b64encode(cipher.nonce).decode('UTF-8') | ||||||
|         ct = b64encode(ciphertext).decode('UTF-8') |         ct = b64encode(ciphertext).decode('UTF-8') | ||||||
|         b64tag = b64encode(tag).decode('UTF-8') |         b64tag = b64encode(tag).decode('UTF-8') | ||||||
|         sendjson = json.dumps({'header': b64encode(header).decode('UTF-8'), 'nonce': nonce, 'message': ct, 'tag': b64tag}).encode( |         sendjson = json.dumps( | ||||||
|  |             {'header': b64encode(header).decode('UTF-8'), 'nonce': nonce, 'message': ct, 'tag': b64tag}).encode( | ||||||
|             'UTF-8') |             'UTF-8') | ||||||
|         self.network.send_msg(self.serverAddr, sendjson) |         self.network.send_msg(self.serverAddr, sendjson) | ||||||
|         try: |         try: | ||||||
| @@ -108,7 +109,8 @@ class NetWrapper: | |||||||
|         ciphertext, tag = cipher.encrypt_and_digest(message) |         ciphertext, tag = cipher.encrypt_and_digest(message) | ||||||
|         nonce = b64encode(cipher.nonce).decode('UTF-8') |         nonce = b64encode(cipher.nonce).decode('UTF-8') | ||||||
|         ct = b64encode(ciphertext).decode('UTF-8') |         ct = b64encode(ciphertext).decode('UTF-8') | ||||||
|         sendjson = json.dumps({'header': b64encode(header).decode('UTF-8'), 'nonce': nonce, 'message': ct, 'tag': b64encode(tag).decode('UTF-8')}).encode( |         sendjson = json.dumps({'header': b64encode(header).decode('UTF-8'), 'nonce': nonce, 'message': ct, | ||||||
|  |                                'tag': b64encode(tag).decode('UTF-8')}).encode( | ||||||
|             'UTF-8') |             'UTF-8') | ||||||
|         self.network.send_msg(self.serverAddr, sendjson) |         self.network.send_msg(self.serverAddr, sendjson) | ||||||
|  |  | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user