I’ve gotten this script of a friend of mine.
It shows 3 tekstfield some selection boxes and submit buttons.
You basicaly just fill in a word or a pharse and it gets transformed into a MD5 hash with a public key, based on the MD5 option (hex,base64 or strong).
Now i want to cut this down to a script that will handle the flow of data from flash to php. PHP will work on its side with a encryption towards the mysql database, and also encrypt the databack into the flashfile.
I know encryption is not the only obstacle to secure connections and dataflow. But I want to make it at least a hard one to take.
So the goal of the script is that each “variable” which needs to be send outside the Flash movie to pass this script so that it will be encrypted with a Base64 MD5 hash.
If anyone has the time to confert this for me I would be very honoured. If you can give me a few hints how to change it’s also good.
If you want to use the script for you own goals be my guest
- render Mainmovie.as into md5lb.swf
the root movieclib as 3 dyn text fields:
input
out
ev
3 bullets:
hex
base64
strong
2 buttons:
butt and eval_b
the acion code of the root movie is below
_root.createEmptyMovieClip(“md5”,1);
_root.md5.loadMovie (“md5lb.swf”,“POST”);//loading lib
_root.md5._alpha=0;
_root.butt.onPress=function(){
enc=[]
enc[0]=“basic function call”;
enc[1]=md5.hex_md5(input.text);
enc[2]=md5.b64_md5(input.text);
enc[3]=md5.str_md5(input.text);
if (input.text!=""){
output.text=enc[my.selectedData];
}else{
output.text=“Please type some thing…”;
}
}
eval_b.onPress=function(){
if (output.text!=""){
enc1=[]
enc1[0]="";
enc1[1]=md5.hex_md5(input.text);
enc1[2]=md5.b64_md5(input.text);
enc1[3]=md5.str_md5(input.text);
encription=enc1[my.selectedData];
//trace(encription+my.selectedData);
ev.text=(encription==output.text);
}else{
output.text=“nothing to eval…”;
}
}