Open AlbertMontserrat opened 8 years ago
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);
}
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
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