BcryptNet / bcrypt.net

BCrypt.Net - Bringing updates to the original bcrypt package

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Is bcrypt.net thread safe

jakedax opened this issue · comments

Hi, I'm doing some investigation into hashing of passwords (it's new to me at the moment). Could you please tell me if bcrypt.net is thread safe.

https://docs.microsoft.com/en-us/dotnet/standard/threading/managed-threading-best-practices#static-members-and-static-constructors

Yes. Basically. There are potential places (like rand generator) where the same source will be used but the derived bytes are created off the back of the data passed in. We don't alter any of the statically defined fields within the library and the class as a whole is static.
Basically following - https://docs.microsoft.com/en-us/dotnet/standard/threading/managed-threading-best-practices#recommendations-for-class-libraries