fuxy wuxy
continuous-integration/drone/push Build is passing Details

This commit is contained in:
Torma Kristóf 2021-04-26 17:24:03 +02:00
parent 12dd07c749
commit ce4fd0cd30
Signed by: tormakris
GPG Key ID: DC83C4F2C41B1047
1 changed files with 1 additions and 0 deletions

View File

@ -123,6 +123,7 @@ class NetWrapper:
retnonce = b64decode(b64['nonce'])
retciphertext = b64decode(b64['message'])
retcipher = ChaCha20_Poly1305.new(key=self.cipherkey, nonce=retnonce)
retcipher.update(b64decode(b64['header']))
plaintext = retcipher.decrypt_and_verify(retciphertext, b64decode(b64['tag']))
retheader = json.loads(b64decode(b64['header']).decode('UTF-8'))
if not (retheader['source'] == self.serverAddr and retheader['type'] == 'CMD'):