bcrypt.net

Why does BCrypt.net GenerateSalt(31) return straight away?

五迷三道 提交于 2019-11-27 01:33:10
问题 I stumbled across BCrypt.net after reading Jeff Atwood's post about storing passwords which led me to Thomas Ptacek's recommendation to use BCrypt to store passwords. Which finally led me to this C# implementation of BCrypt In the comments on the last link above someone asked "Why do GenerateSalt(30) take for ever, but GenerateSalt(31) seems to take no time at all?" I ran BCrypt.HashPassword(password, BCrypt.GenerateSalt(31)) and got my result in 0 milliseconds. I've been running BCrypt

Can someone explain how BCrypt verifies a hash?

孤街醉人 提交于 2019-11-26 22:29:50
I'm using C# and BCrypt.Net to hash my passwords. For example: string salt = BCrypt.Net.BCrypt.GenerateSalt(6); var hashedPassword = BCrypt.Net.BCrypt.HashPassword("password", salt); //This evaluates to True. How? I'm not telling it the salt anywhere, nor //is it a member of a BCrypt instance because there IS NO BCRYPT INSTANCE. Console.WriteLine(BCrypt.Net.BCrypt.Verify("password", hashedPassword)); Console.WriteLine(hashedPassword); How is BCrypt verifying the password with the hash if it's not saving the salt anywhere. The only idea I have is that it's somehow appending the salt at the end

Can someone explain how BCrypt verifies a hash?

只谈情不闲聊 提交于 2019-11-26 12:19:06
问题 I\'m using C# and BCrypt.Net to hash my passwords. For example: string salt = BCrypt.Net.BCrypt.GenerateSalt(6); var hashedPassword = BCrypt.Net.BCrypt.HashPassword(\"password\", salt); //This evaluates to True. How? I\'m not telling it the salt anywhere, nor //is it a member of a BCrypt instance because there IS NO BCRYPT INSTANCE. Console.WriteLine(BCrypt.Net.BCrypt.Verify(\"password\", hashedPassword)); Console.WriteLine(hashedPassword); How is BCrypt verifying the password with the hash

Is BCrypt a good hashing algorithm to use in C#? Where can I find it? [closed]

半世苍凉 提交于 2019-11-26 09:05:05
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 2 years ago . I have read that when hashing a password, many programmers recommend using the BCrypt algorithm. I am programming in C# and is wondering if anyone knows of a good implementation for BCrypt? I found this page, but I don\'t really know if it is bogus or not. What should I be aware of when choosing a password