cryptico icon indicating copy to clipboard operation
cryptico copied to clipboard

Do not support UTF-8

Open SLyHuy opened this issue 10 years ago • 8 comments

plaintext: "Mưa nắng là chuyện của mày, tao đéo quan tâm!!! Được không hả?"

after encrypt & decrypt: "MLa nZng là chuyn c˜a mày, tao ¢éo quan tâm!!! —Sc không hÈ?"

SLyHuy avatar Aug 21 '14 03:08 SLyHuy

I've just done a correction on my repository about utf-8 : https://github.com/jpfox/cryptico

jpfox avatar Jan 21 '15 15:01 jpfox

Thank you. What's your solution? I'm using: Convert UTF-8 to ASCII, Encrypt-Decrypt - Convert ASCII to UTF-8. by using this script: http://stackoverflow.com/a/834529/2480623

SLyHuy avatar Jan 21 '15 15:01 SLyHuy

I use unescape(encodeURIComponent(string)) and decodeURIComponent(escape(uriencoded)) to convert text before AES encryption and after decryption. It permits to switch easily to single byte encoding.

I made just few changes on original code : https://github.com/jpfox/cryptico/commit/73db107f8e1e0d59696e1aece9e7a2bc82268707

jpfox avatar Jan 22 '15 09:01 jpfox

Thank jpfox !

b6g9 avatar Sep 02 '15 02:09 b6g9

@jpfox this will work with binary data instead of text?

Elmapul avatar Nov 27 '16 19:11 Elmapul

@Elmapul no, I don't think so. If you need a project using password-derived-key to encrypt files, have a look to miniLock

jpfox avatar Nov 28 '16 08:11 jpfox

@jpfox would you create a pull request to the upstream someday? otherwise I may do the chord.

beenotung avatar Dec 09 '17 22:12 beenotung

You can use commit in previous comment to create a PR if you want. No problem for me.

jpfox avatar Dec 10 '17 08:12 jpfox