I'm trying to encrypt some content that I have in a JSON file.
I have this content localized in several languages such as Spanish, German, Japanese or Chinese (traditional and simplified), and others.
The content can be encrypted, but cannot be unencrypted because of some character are not encrypted correctly. I have checked the problematic characters are the Japanese or Chinese ones. I have the same problems with some German or Russian characters. It crashes when I try to parse the content (that is plain text):
JSON.parse(decrypted_plain_text)
Then, I get the error.
Does this algorithm support characters such as Japanese or Chinese characters?
I've tried to change the encoding from UTF-8
to UTF-8 w/o BOM
but it doesn't work, either.
The algorithm is A256GCM
and the CEK
is A128KW
.