Click here to Skip to main content
15,886,091 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
Hi, I'm new to this. I'm no sure how to store a BCrypt password on a SQL database via c#. Can someone please help?

This is my code so far:
C#
String mySalt = BCryptHelper.GenerateSalt(10);
String myPasswordHash = BCryptHelper.HashPassword("letmein123", mySalt);
Posted
Updated 4-Jul-14 17:11pm
v4
Comments
[no name] 4-Jul-14 21:10pm    
Help with what? Why are you unable to insert a string into your database?
ZurdoDev 4-Jul-14 22:10pm    
myPasswordHash is just a string so write it to the database. Where are you stuck?
Member 10703465 4-Jul-14 22:44pm    
So, does that mean to use the 'Insert Value' from the SqlCommand from c#
ZurdoDev 5-Jul-14 8:43am    
I think you need to read some article on how to work with the database then.

1 solution

 
Share this answer
 
Comments
Member 10703465 5-Jul-14 6:13am    
How do I use your solution with BCrypt to store the hash password in the database?

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900