Good morning,
I am sure this has been asked before. So here it goes. I've been playing with these two php functions and was wondering if I have the logic right.
let's say I wrote a function called crazy encrypt
<?php
function crazyencrypt($password){
$is="isthis";
$overkill="overkill";
$pass = $password.$is;
$pass1=md5($pass).$is;
$pass2=sha1($pass1).$overkill;
$password=md5($pass2, true);
return $password;
}
?>
I mean what the function is doing is salting the hashes is this overkill though I mean I could write it like
function crazyencrypt($password){
$i = array("isthis", "overkill",md5, sha1,$pass, $pass1, $pass2, $password, true);
$i[4]=$i[7].$i[0];
$i[5]=$i[2]($i[4]).$i[0];
$i[6]=$i[3]($i[5]).$i[1];
$i[7]=$i[2]($i[6],$i[8]);
return $i[7];
}
could I make two arrays with the second code? Just playing around, this is how i learn