Reputation: 1112
I have to implement the following scenario for the needs of my project.
I tried to follow the example from here by using json.dumps
as follows:
cipher_text = hyb_abe.encrypt(master_public_key, fileInBase64Format, policy) #this function comes from the charm-crypto framework and returns a dictionary
encrypted_bytes = json.dumps(cipher_text) # produces error TypeError: Object of type 'Element' is not JSON serializable
The code of hyb_abe.encrypt
function is here
but I am getting
TypeError: Object of type 'Element' is not JSON serializable
What could be a workaround for my case?
EDIT
Photo of the value of the dictionary in debug mode
Upvotes: 0
Views: 94