How to view my previous post “About her”?

Thanks for your interest.
But the content won’t please you unless…
You will see it only if you are an ActionScript fan 🙂
The fun for you may lie in the algorithm anyhow.

//ActionScript
function decode(src:String):String {
 var base64chars:String = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";

 var i:Number = 0;
 var output:String = new String("");
 var chr1:Number, chr2:Number, chr3:Number;
 var enc1:Number, enc2:Number, enc3:Number, enc4:Number;
 while (i<src.length) {
  enc1 = base64chars.indexOf(src.charAt(i++));
  enc2 = base64chars.indexOf(src.charAt(i++));
  enc3 = base64chars.indexOf(src.charAt(i++));
  enc4 = base64chars.indexOf(src.charAt(i++));
  chr1 = (enc1 << 2) | (enc2 >> 4);
  chr2 = ((enc2 & 15) << 4) | (enc3 >> 2);
  chr3 = ((enc3 & 3) << 6) | enc4;
  output += String.fromCharCode(chr1);
  if (enc3 != 64) {
   output = output+String.fromCharCode(chr2);
  }
  if (enc4 != 64) {
   output = output+String.fromCharCode(chr3);
  }
 }
 return unescape(output);
}

 
Advertisements
This entry was posted in Life. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s