def decrypt()

in asyncrat/asyncrat.py [0:0]


    def decrypt(self, key: bytes, ciphertext: bytes) -> str:
        aes_key: bytes = PBKDF2(key, self.get_salt(), 32, 50000)
        cipher = AES.new(aes_key, self.AES_CIPHER_MODE, ciphertext[32 : 32 + 16])
        plaintext: str = cipher.decrypt(ciphertext[48:]).decode("ascii", "ignore").strip()
        return plaintext