defuse / password-hashing

Password hashing code.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

dotnet core version

1rosehip opened this issue · comments

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.

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

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); }

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