c# - How to insert user records the database using the SQL query with hashing password like Asp.Net MVC hashing mechanism -


i have batch of user accounts , every user account's password not crypted.i want insert user accounts database using sql insert query want hash passwords while insert asp.net mvc hashing mechanism in query.

is possible , if how can handle this?

thanks

you can use hashbytes function this. in query hashing using md5 algorithm.

insert userdetails_tab(username,passwd,..,..) values('test',hashbytes('md5','testpass'),..,..) 

Comments