Mohamad
Mohamad

Reputation: 35339

What is the correct datatype for storing hashed passwords in mysql?

I plan to hash passwords on my server using SHA512 before inserting them into my database. What datatype should I use for the password column?

Upvotes: 1

Views: 2884

Answers (1)

Aif
Aif

Reputation: 11220

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

Upvotes: 2

Related Questions