String strAlgName = HashAlgorithmNames.Sha1;
HashAlgorithmProvider objAlgProv = HashAlgorithmProvider.OpenAlgorithm(strAlgName);
CryptographicHash objHash = objAlgProv.CreateHash();
String strMsg1 = "test";
IBuffer buffMsg1 = CryptographicBuffer.ConvertStringToBinary(strMsg1, BinaryStringEncoding.Utf16BE);
objHash.Append(buffMsg1);
IBuffer buffHash1 = objHash.GetValueAndReset();
I have codes like this above, they are working fine but I'm gonna use them for moodle project, so I need to hash my passwords with "2y$" identifier.
What can I use? I can't use nuGetPackages like cryptsharpofficial, cause it gives error when I want to use it in Windows 10 November Update (10586)
$2y$
is thecrypt
scheme ID for a variant of bcrypt/blowfish - look for a C# library that supports this, .e.g github.com/BcryptNet/bcrypt.net