Following is a php function for masking a string. Can somebody give me the actionscript equalent for this function.
public static function simple_encrypt($input) {
$return = array();
for($i = 0; $i < strlen($input); $i++){
$ascii = ord(substr($input, $i, 1)) * 2;
$return[] = base_convert($ascii, 10, 32);
}
return sprintf('RL%s', implode('', $return) ); // "RL" ensures it starts with a letter
}