Jump to content

Password Fields

- - - - -

This topic has been archived. This means that you cannot reply to this topic.
2 replies to this topic

#1
TcM

TcM

    Writes binary right handed and hex left handed

  • Members
  • PipPipPipPipPipPipPipPipPip
  • 11,147 posts
Are the password fields always case-sensitive? Because sometimes the username field are not.

Does this depend from the programming or from the Database field type?

Thanks

#2
gszauer

gszauer

    Programmer

  • Members
  • PipPipPipPip
  • 113 posts
This depends on how the registration page is coded.
For instance, when i make a php login form it is never case sensitive, because i always call the strtolower function.
ALSO, the password should NEVER be stored in a database, only the encripted version, here is what i use both on the registration page, and the login page

$password = htmlspecialchars(addslashes($_REQUEST[password]));

$hash = "_24+(c";

$pass = md5(md5(strtolower($password)+$hash)+$hash);

$password is the input from the login/registration form
$hash is a random hash code
$pass is the encripted password is encrypted it is already in all lower case no matter what the user inputs into the form.
Does this help at all?

~Aristotle said:

It is the mark of an educated mind to entertain a tought without accepting it
If my post was helpful, please help me build some rep Posted Image

#3
TcM

TcM

    Writes binary right handed and hex left handed

  • Members
  • PipPipPipPipPipPipPipPipPip
  • 11,147 posts
Yes. Thanks for your help.