Page 1 of 1

Is this function safe?

Posted: Mon Mar 03, 2008 6:52 am
by paulubz
Is the crypt() function safe? If so, how do i use it? If not, any better?

Re: Is this function safe?

Posted: Mon Mar 03, 2008 10:47 am
by Mordred
"Safety" is not a concept that is applicable to functions, rather to their usage. There is no inherent safety or unsafety in a function, only when it's used. Show code.

Re: Is this function safe?

Posted: Tue Mar 04, 2008 4:52 am
by paulubz
Okay, the code, using the CRYPT_STD_DES version goes like this:

Code: Select all

 
<?php 
$mypassword = crypt('mypasswordhere' , 'd4');
?>
 
Then I store this password into the database. How safe is it?