using Microsoft.AspNetCore.Cryptography.KeyDerivation;
using System.Security.Cryptography;
public static void Main()
string password = Console.ReadLine();
byte[] salt = RandomNumberGenerator.GetBytes(128 / 8);
Console.WriteLine($"Salt: {Convert.ToBase64String(salt)}");
string hashed = Convert.ToBase64String(KeyDerivation.Pbkdf2(
prf: KeyDerivationPrf.HMACSHA256,
numBytesRequested: 256 / 8));
Console.WriteLine($"Hashed: {hashed}");
Console.WriteLine("Hash is " + hashed);