I'm using Ubuntu win. on python I want to encrypt file by use AES mode CFB in pycryptodome but the result I have is encryption the path as txt file on the real path of the file?
>>> import os
>>> import math
>>> import hashlib
>>> import json
>>> from Crypto.Cipher import AES
>>> from Crypto import Random
>>> from Crypto.Random import get_random_bytes
>>> from base64 import b64encode, b64decode
#######################################
>>> key = get_random_bytes(32)
>>> data = 'path_of_file.json'
>>> datanew = data.encode('utf-8')
>>> cipher = AES.new(key, AES.MODE_CFB)
>>> cipher_datanew = cipher.encrypt(datanew)
>>> iv = b64encode(cipher.iv).decode('utf-8')
>>> ct = b64encode(cipher_datanew).decode('utf-8')
>>> result = json.dumps({'iv':iv, 'ciphertext':ct})
>>> print(result)
{"ciphertext": "3s1bIOPwYAMCQxwcdmQ910mxeEiizD64LAZeP0eVQM0P8Mm6", "iv": "MtIYXOP2Z23jpukldmSNXA=="}