dummy encrypt
Wednesday, June 25, 2008
It wlll add a random number between 0-9 to every sencond charcter in a string i find it very usfull if u are trying to use base64 on a more protected level as if u encrypt the same string twice the output would be different as it insterts random numbers even tho this isent as advance as most encryption tech's it would be a good addition to add to others to make them that little bit more secure from prying eyes.
code :
function dummy_encode($str) {
$len = strlen($str);
$str1=0;
$final="";
while ($str1 < $len) { $final = $final.substr($str, $str1, 1); $str1++; $final = $final.rand(0,9); } return $final; } function dummy_decode($str) { $len = strlen($str); $str1=0; $final=""; while ($str1 < $len) { $final = $final.substr($str, $str1, 1); $str1=$str1+2; } return $final; }
references :
- DAB-Hacker
- Planet-source-code.com