0

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

2
Contributors
2
Replies
3
Views
9 Years
Discussion Span
Last Post by Dsiembab
0

Dang ! Do you really need this level of encryption :D ! But anyways, What do you mean by 2 arrays with 2nd code ?

0

no just like to play with php. Putting the second part into an array

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.