I've created an insane encrypter that I think is pretty tough to crack (It's easy now but I'll change it because this is public, ya know
) but anyway, it encrypts just fine, but the decrypting is horrible...
Code:
<?php
$string = $_POST['encodeStr'];
str_replace("a", "", $string, $counta);
$counta = "@.$counta";
str_replace("b", "", $string, $countb);
$countb = "^.$countb.";
str_replace("c", "", $string, $countc);
$countc = "$countc.&";
str_replace("d", "", $string, $countd);
$countd = "~.$countd";
str_replace("e", "", $string, $counte);
$counte = "`.$counte.";
str_replace("f", "", $string, $countf);
$countf = "$countf.;";
str_replace("g", "", $string, $countg);
$countg = "=.$countg";
str_replace("h", "", $string, $counth);
$counth = "\.$counth.";
str_replace("i", "", $string, $counti);
$counti = "$counti.|";
str_replace("j", "", $string, $countj);
$countj = "+.$countj";
str_replace("k", "", $string, $countk);
$countk = "*.$countk.";
str_replace("l", "", $string, $countl);
$countl = "$countl.(";
$letters = array("-","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z");
$numbers = array("1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17","18","19","20","21","22","23","24","25","26");
$letters2 = array("-","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z");
$numbers2 = array("0","1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17","18","19","20","21","22","23","24","25","26");
$stringReplaced = str_replace($letters, $numbers, $string);
$stringReplaced2 = str_replace($numbers2, $letters2, $string);
$randNum = rand(1, 25);
$pieces = explode($numbers[$randNum], $stringReplaced);
$squishedTog = "$pieces[0]$counta$pieces[26]$countb$pieces[1]$pieces[25]$countc$pieces[2]$peices[4]$pieces[23]$pieces[15]$pieces[10]$pieces[22]$countg$countd$pieces[21]$pieces[3]$pieces[14]$pieces[8]$counte$countf$pieces[5]$coungh$pieces[13]$pieces[6]$pieces[7]$counti$pieces[24]$pieces[12]$pieces[11]$countj$countk$pieces[9]$pieces[16]$pieces[17]$pieces[18]$pieces[19]$pieces[20]";
echo "Your encoded string is:";
echo "<hr />";
//echo "Converted $string to <b>$counta$stringReplaced$countb-$countc</b>";//Not as strong
//echo "<hr />";
echo $squishedTog;//Very strong, different every time!
echo "<p>Tough to believe that used to be $string, eh?</p><hr />";
?>
<form action="" method="post">
<input type="text" name="encodeStr" />
</form>
to DECRYPT? It's a tough script...
If you want, just copy-paste that into anything .php and try it. Type something in the box and it will encrypt it for you.