defuse / password-hashing

Password hashing code.
BSD 2-Clause "Simplified" License
857 stars 219 forks source link

dotnet core version #85

Open 1rosehip opened 7 years ago

1rosehip commented 7 years ago

Hi, Thank you for the repo. The code could not be compiled in dotnet core because of the following issue: https://github.com/dotnet/corefx/issues/2881 Please consider adding also dotnet core version file. Thanks.

defuse commented 7 years ago

I'd be happy to accept a pull request if someone wants to do that, I'm not familiar with dotnet core.

dan2dev commented 7 years ago

Hi, To use in dotnet core we just need change this: using (RNGCryptoServiceProvider csprng = new RNGCryptoServiceProvider()) { csprng.GetBytes(salt); } to this: using (var rng = RandomNumberGenerator.Create()) { rng.GetBytes(salt); }

dan2dev commented 7 years ago

I created a Pull Request to include the file I made.