MySql password field

Questions about the MySQL, PostgreSQL, and most other databases, as well as using it with PHP can be asked here.

Moderator: General Moderators

Post Reply
bogdan
Forum Commoner
Posts: 27
Joined: Wed May 31, 2006 10:07 am
Location: Timisoara, Ro

MySql password field

Post by bogdan »

Hi, I remember that in other SQLs when creating a table you could set one field for the password, which is automaticaly encrypted.
I was trying to create a field: pass - password or pass- varchar and set it as password.... I think you get what I mean.
Any help is much appreciated.

Regards, B
User avatar
RobertGonzalez
Site Administrator
Posts: 14293
Joined: Tue Sep 09, 2003 6:04 pm
Location: Fremont, CA, USA

Post by RobertGonzalez »

MySQL, to the best of my knowledge, does not automatically 'encrypt' data in a field. Usual methodology in to create a varchar(32) or varchar(64) and either use/create a hashing algorithm (like MD5(), SHA1() or Feyd's SHA256()) to convert the password into hashed value. Notice that I didn't say encrypted, but hashed. Please search these forums for 'encryption' for a lot of explanation between the differences in hashing and encrypting.
Post Reply