SQL Server 2008 what DataType to store a hashpassword in
I am currently building a login process and decided to store my user password in database with a hashpassword combined with a salt. Ju开发者_Go百科st wondering what datatypes to store the hashpassword and salt is Varchar or NVarchar sufficient ?
EDIT : Link where I am basing this on storing passwords in SQL Server
Microsoft use Nvarchar
in when we use SQL membership, have a look the below image
The hash of your passwords should be of uniform string length and represented as either hex or base64 text (or some other, single-byte-per-character representation.)
EDIT (You just need the char type per the uniform length of hash output!)
So char will suffice.
use the varchar
datatype
-- blah blah blah --
I need 30 characters to post a reply
精彩评论