Skip to content

Cannot decrypt jpg file #65

@antoine-wbr

Description

@antoine-wbr

Hello,

I have a jpg file that was encrypted on a server (with nodejs). When I try to decrypt it (on iOS) with this library it fails with 'Decrypt failed'.

I looked into the code and did some debugging. The actual decrypt works fine but it looks like the conversion to a String fails because it's using NSUTF8StringEncoding. I'm pretty sure there is data in my jpg file that is not compliant with UTF8 encoding (see https://github.com/tectiv3/react-native-aes/blob/master/ios/RCTAes/lib/AesCrypt.m#L115).

May be the string returned should use base64 encoding just like for encrypt.

Thanks for your help.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions