I like PHP, its my favorite language when it comes to web-scripting, and from time to time i like to just see what i can come up with... so i was messing around today and came up with this:
<?PHP
function string_to_ascii($string){
$ascii = NULL;
for ($i = 0; $i < strlen($string); $i++){
$ascii .= ord($string[$i]);
}
return($ascii);
}
function enc($password){
$keycode_base64=base64_encode("testkeycode");
$password_base64=base64_encode($password);
$keycode_ascii=string_to_ascii($keycode_base64);
$password_ascii=string_to_ascii($password_base64);
$keycode=NULL;
$i=0;
$offset=0;
while($offset<strlen($keycode_ascii)&&$i<strlen($password_ascii)){
$keycode .= $keycode_ascii[$offset] + $password_ascii[$i];
if($offset<strlen($keycode_ascii))
{$offset++;}
else
{$offset=0;}
if($i<strlen($password_ascii))
{$i++;}
else
{$i=0;}
}
return($keycode);
}
$keycode_base64=base64_encode("testkeycode");
$password_base64=base64_encode("testpassword");
$keycode_ascii=string_to_ascii($keycode_base64);
$password_ascii=string_to_ascii($password_base64);
$enc = enc("testpassword");
echo "$keycode_base64<br>$password_base64<br>$password_ascii<br>$keycode_ascii<br>$enc";
?>
I assume if you are perusing this sub-forum you can figure out what this is meant to do... i'm not even sure this would do what it is intended to do very well...