RNCryptorNative icon indicating copy to clipboard operation
RNCryptorNative copied to clipboard

Encrypted UTF-16 strings cannot be decrypted

Open Edalbrelord opened this issue 6 years ago • 0 comments

When I try to decrypt strings encrypted in iOS I encounter the following error: JNI DETECTED ERROR IN APPLICATION: input is not valid Modified UTF-8: illegal start byte 0xff'

After a little troubleshooting I managed to decrypt using the JNCryptor implementation, but only if I parsed the byte array to a UTF-16 string.

Since UTF-8 is hardcoded in the decryptAsync(), is it OK if I create a pull request where the charset is an optional parameter? It would default to UTF-8 and therefore not have any breaking changes.

Edalbrelord avatar Dec 27 '19 20:12 Edalbrelord