Argh!!! RC4 Encryption returns Weird Text!

Get help using Construct 2

Post » Sat Jun 16, 2012 8:19 am

Hi Guys,
I'm playing around with RC4 Encryption in JS, and calling it with the CallJS and Function (injectJS) Plugins.

I'm able to successfully use the 2 plugins to call the JS code to encrypt my text, but the encrypted text seems to be all jumbled up, and is not the same as on a 'proper' implementation, e.g.:

http://shop-js.sourceforge.net/crypto.htm

For example I'll enter in:
text = "new"
key = "aaa"

From the sourceforge page I get: "sTlr"

Whereas if I call the same code from my construct 2 project I get: "RD"

I've used both CallJS from Joe7 and Function (InjectJS) from RexRainbow, which return the same result, so it's not an issue with the plugins. I'm not sure if perhaps there is something weird with the character sets that are returned, or some behaviour with C2 that I don't know about?

Any ideas guys?EyeHawk2012-06-16 08:26:13
B
34
S
8
G
3
Posts: 328
Reputation: 7,692

Post » Sat Jun 16, 2012 8:28 am

Also the script (copied from the sourceforge page)and my capx are here:

https://dl.dropbox.com/u/65326552/encryptioncapx.rar
B
34
S
8
G
3
Posts: 328
Reputation: 7,692


Return to How do I....?

Who is online

Users browsing this forum: Lof, YoHoho and 21 guests