Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Corrupted decrypted string with emojis #44

Open
AlbertMontserrat opened this issue Apr 21, 2016 · 2 comments
Open

Corrupted decrypted string with emojis #44

AlbertMontserrat opened this issue Apr 21, 2016 · 2 comments

Comments

@AlbertMontserrat
Copy link

I'm not able to encrypt a text with emojis in the server, and decrypt it in iOS.
Have you tested it?
Is there a way to do it?

Thanks

@AlbertMontserrat
Copy link
Author

AlbertMontserrat commented Apr 21, 2016

I acheived it with this code:

 if (isEncrypt) {
        encryptor = _crypto2['default'].createCipheriv(this._algorithm, keyBl.toString(), ivBl.toString());
        //encryptor.setEncoding(this._encoding);
        //encryptor.write(text);
        //encryptor.end();
        //return encryptor.read();
        var encrypted = encryptor.update(text, this._charset, this._encoding);
        encrypted += encryptor.final(this._encoding);
 }

@ybanezmarjune
Copy link

Hi @AlbertMontserrat

I have problem same as yours. I already send a pull request to the author. But it seems they are busy to help us. If you want, just fix it by your self.

This problem is in c# (Back-end) you must modify it. This problem occurs when you try to encrypt a symbol text.

The only way to fix this error is to modify your back-end(c#) and get the converted UTF-18 encoding length from your StringToConvert.

Refer the link below and try it by yourself.

https://github.com/Pakhee/Cross-platform-AES-encryption/pull/45/files

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants