views:

128

answers:

1

Hello,

I am writing an application in ColdFusion where storing passwords is necessary. I plan to hash the passwords on the server (using the SHA512 Hash function in ColdFusion) before inserting them into a password column in my database. I would like to know what datatype to use for the password column.

Many thanks!

+2  A: 

Depends if your encrypted password may be binary or not : if yes, use blob or varbinary, otherwize char, varchar or text will do it. reference : mysql

Aif
Thanks, Aif. Does MySQL have it's own hash function? If that is true, I don't have to use a ColdFusion function to hash the password! I can user a built in MySQL Function, correct? And if I did use a MySQL, would the password be binary or not? Am I right in thinking I can hash the password string using MySQL before the insert statement?
Mel