crypt() problems
Posted: Mon Jul 01, 2002 1:38 pm
Hi,
I am trying to encrypt a string using DES (yes, I know it's insecure, but I need to use it for compatibility with my MUD's savefiles). If I do a call like this:
$encrypted = crypt($login_pass, substr($login_pass, 0, 2));
$encrypted is equal to the salt plus some encrypted string.
This isn't a bug with the crypt() function on my system, as this all works fine from C. I suspect it has something to do with how I'm passing the arguments.
Thank you for any help.
I am trying to encrypt a string using DES (yes, I know it's insecure, but I need to use it for compatibility with my MUD's savefiles). If I do a call like this:
$encrypted = crypt($login_pass, substr($login_pass, 0, 2));
$encrypted is equal to the salt plus some encrypted string.
This isn't a bug with the crypt() function on my system, as this all works fine from C. I suspect it has something to do with how I'm passing the arguments.
Thank you for any help.