I need a proven example to show how its possible to encrypt a string in AS3 and decrypt it in Ruby and vice versa ?, I found articles in PHP, but, I didn't find any in Ruby.
Can some one help by providing an example or some blog ?
I need a proven example to show how its possible to encrypt a string in AS3 and decrypt it in Ruby and vice versa ?, I found articles in PHP, but, I didn't find any in Ruby.
Can some one help by providing an example or some blog ?
Why don't you create your own algorithm to encrypt your strings?
You can create a variation of ROT13, and use a similar code in both languages. So simple.
ROT 13 is something like this in AS3:
function calculate(src : String) : String {
var charsMap : String = "ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMabcdefghijklmnopqrstuvwxyzabcdefghijklm";
var calculated : String = new String("");
for (var i : Number = 0; i < src.length ; i++) {
var character : String = src.charAt(i);
var pos : Number = charsMap.indexOf(character);
if (pos > -1) character = charsMap.charAt(pos + 13);
calculated += character;
}
return calculated;
}
What I recommend to you is make a variation, shuffling your string in some non-random pattern, and un-shuffle in your Ruby code.