using Microsoft.AspNetCore.Cryptography.KeyDerivation;
public static void Main()
Console.WriteLine(ComputeHash("password", "salt"));
public static string ComputeHash(string input, string salt)
byte[] bytes = Encoding.UTF8.GetBytes(salt);
return Convert.ToBase64String(KeyDerivation.Pbkdf2(input, bytes, KeyDerivationPrf.HMACSHA512, 120000, 64));