Closed ghost closed 1 year ago
have you solved this issue? i am having the same problem.
I come up with this https://stackblitz.com/edit/typescript-vxan7n?file=index.ts
Basically extracting salt
iv
and ciphertext
from cipherParams
and putting them in object
then stringifing the object and converting that string to base64 (binary). Same process in decrypting but in reverse
I don't know, maybe there is better solution
@evanvosberg Hello, is this a good approach?
Just simple code (live: https://stackblitz.com/edit/typescript-vxan7n?file=index.ts)
The question is I want to store encrypted as binary. Then I will read that binary and decrypt it. How to do so? I cannot understand what should I put into binary file the
cipherParams
orencryptedWords
. Could you show an example or something. Like cipherParams looks a bit sensetive data, it has KEY and algotiyhm information about ciphertext. And also why decrypt() takes cipherParams and not ciphertext ?:(