We need to convert some API KEYS to line numbers and convert them to the original string.
Sample API KEY: "ZfIgG9LliwY4cDw4Rqso0m7SEQZovI"
We converted it using our algorithm
var encode_array:Array = "ZfIgG9LliwY4cDw4Rqso0m7SEQZovI".split("");
var encode_string:String;
var count1:int = encode_array.length; var i1:int;
for (i1 = 0; i1 < count1; i1++)
{
switch(encode_array[i1])
{
case "*":
encode_string += *;
break;
...
}
Converted API KEY:"364219431799224845593594391459942853555190499729152736515819"
Each number 2 on this line refers to 1 chracter in the KEY API. (Example: "36"> "Z")
My problem is the second part to undo this (convert every 2 numbers to a specific character). How can I divide all 2 numbers on this line and store them in an array? I think this is possible using Split " or RegExp in ActionScripts, but I don't know how to do this.
source
share