Reputation: 6523
I am currently building a login process and decided to store my user password in database with a hashpassword combined with a salt. Just 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
Upvotes: 3
Views: 5047
Reputation: 81429
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.
Upvotes: 2
Reputation: 52241
Microsoft use Nvarchar
in when we use SQL membership, have a look the below image
Upvotes: 4
Reputation: 18572
use the varchar
datatype
-- blah blah blah --
I need 30 characters to post a reply
Upvotes: 1