Saturday 15 May 2010

asp.net - Storing a SHA512 Password Hash in Database -


In my asp.net web application, I am hitting my user password with SHA512.

Despite that SO'ing and Googling is not clear how I should store them in the database (SQL2005) - shows the basics of the code below how I made a string as a string And I'm currently putting it into the database, in the form of a variable (88) column it seems that continuous length is prepared

keeping it in the form of string is best The way, if it is So always SHA512 will have 88 characters (as I have seen some strange stuff on Google)?

  dim biointeput byte () = encoding.utf8 Dim Hash Hasish Algorithm = New SHA 512Manageet () Dim CINSRTO Database String = Convert as GetBytes (SSLL and SINTP). Tubes 64 string (hash. Compute hash byteInput))  

SHA512 output 512 bits, or 64 bytes. You can store those 64 bytes in those biometry columns, if you want

If you want to handle the hash outside of your application, then Base 64 string is more comfortable to store, as The Base 64 connects approximately 33% of the continuous overhead, so you can expect that the string is always 88 characters.

It has been said, there is a Biltin in ASP.Net, which should be used.


No comments:

Post a Comment