Jump to content
MakeWebGames

Recommended Posts

Posted

Say If I was creating a database to store passwords and usernames which may have numbers, characters and - or _ etc. what would I use?

Would I user VARCHAR or TEXT?

Also whats the difference between the two? And if there are any others which would you suggest?

Posted

TEXT doesn't have limit (or nearly) on the size of the field. While VARCHAR you need to define the size of it before, and you cannot store more than that till you increase the size. There is also a limit of how big you can store in there. For a password, I doubt you go anyhow to anything longer than 32 char... so Varchar would be the way to go. Yet... Security wise, I'm far from being sure I would do a DB with all my passwords ;)

Posted

If you hash them (MD5, SHA1, SHA256 or whatever) think that you cannot recover them (yes yes, rainbow tables and others can), so it is basically useless as well if it is to store password for services. If it is for your own site then sure use that.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...