How to create a mysql "sha-256" column?

Viewed 20357

For a password column, is there a mysql feature to store password hashed with "sha-256"? Or should I hash it from java code (like How to hash some string with sha256 in Java? ) before I store it in database and then hash the password input every time and compare with the database column value to authenticate?

TIA.

1 Answers
Related