If you're new to PHP, here is a simple parody of Diffie-Hellman expressivity using for loops to get you started. Conversion to a bash script will not be very difficult and you'll be selling 'strong' encryption in no time!
Code:
<span style='font-family: monospace; font-size: 13px;'>
<?php
// parody of Diffie-Hellman
for ($lines=1; $lines<=86; $lines++) {
for ($dhm=1; $dhm<=150; $dhm++) {
$dhparam = rand(1, 50);
if ($dhparam == "1") {
$dhparam = "+";
} else {
$dhparam = ".";
}
if ($lines != "86") {
if ($dhm <= "150") {
print $dhparam;
}
}
if ($lines == "86") {
if ($dhm < "145") {
print $dhparam;
} else {
print "++*++*";
break;
}
}
}
print "<br />";
}
?>
</span>
Last edited by a moderator: