This commit is contained in:
parent
12dd07c749
commit
ce4fd0cd30
@ -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'):
|
||||
|
Loading…
Reference in New Issue
Block a user