unencrypting values
Posted: Tue Jan 20, 2004 8:35 pm
I have a function:
<?php
function Encrypt($string) {//hash then encrypt a string
$crypted = crypt(md5($string), md5($string));
return $crypted;
}
?>
and I want to unencrypt strings from a mysql database crypted with this function. how would I do that? For example, I have a login script that crypts the username and password, but to retrive the username to sort a table with a mysql query would be impossible becuase all I know is the username and not the crypted string!
<?php
function Encrypt($string) {//hash then encrypt a string
$crypted = crypt(md5($string), md5($string));
return $crypted;
}
?>
and I want to unencrypt strings from a mysql database crypted with this function. how would I do that? For example, I have a login script that crypts the username and password, but to retrive the username to sort a table with a mysql query would be impossible becuase all I know is the username and not the crypted string!