Search the Community
Showing results for tags 'crypt'.
-
Hi, I see that when I am applying crypt function on the text 'samurai.ciscorouter1', output is same as it is for 'samurai.ciscorouter2'. Is the code I am giving how it must be? print "<hr/>" .crypt(crypt(crypt('samurai.ciscorouter1',CRYPT_SHA512), CRYPT_SHA512), CRYPT_SHA512); print "<hr/>" .crypt(crypt(crypt('samurai.ciscorouter2',CRYPT_SHA512), CRYPT_SHA512), CRYPT_SHA512);
- 4 replies
-
- crypt_sha512
- crypt
-
(and 1 more)
Tagged with:
-
Hi! Let's test my site. CryptBB - Open source encrypted forum: http://cryptbb.site40.net Opinions? cryptbb-1.13.3.10.zip
-
Hi Everyone, I just had a few questions about the encryption function crypt(). If I was to do crypt($_POST['password'],CRYPT_BLOWFISH) , assuming I had just sent through a password from the form on the previous page it would return an Blowfish encrypted string. If I then used mysql to write it to my database, how, when the user logs in, would I compare the password that they have entered in the login form to the password in the database. If I compared password to the query result from the database I assume it would return that the strings do not match. My question is how would I go about comparing these two values? Is there a decrypt function that I could use to unencrypt the information from the database so that I could compare the given password with the password in the database? Thanks in advance for any help, advice or ideas! Timothy
- 10 replies
-
- crypt()
- encryption
-
(and 3 more)
Tagged with:
-
i have written the below quick php script to show the quick usage of CRYPT Function -- <?php function cryptpassword($input) { $salt = bin2hex(mcrypt_create_iv(32, MCRYPT_DEV_URANDOM)); //$hash = crypt($input, "\$5\$rounds=50000\${$salt}\$"); // <<<--- AM I SUPPOSE TO USE THIS $hash = crypt($input, '$5$rounds=50000${$salt}$'); // <<<--- OR AM I SUPPOSE TO USE THIS return $hash; } $cryptedpassword = cryptpassword('test123');//pass the password which you want to encrypt echo $cryptedpassword; ?> It returns s below -- $5$rounds=50000${$wnklXJLpO.n6UXPwNPcZmLjSRZP0vOgbqTn3.rIplM4 what "$5$rounds=50000" is doing in the output , if yes then do we need to store the whole above generated string in db or just without the "$5$rounds=50000" part. Am i doing something wrong here ?