using System.Security.Cryptography;
public const int SALT_SIZE = 12;
public const int HASH_SIZE = 32;
public const int ITERATIONS = 30000;
public static void Main()
RNGCryptoServiceProvider provider = new RNGCryptoServiceProvider();
string salt = "VxEZbwrVrleU";
Rfc2898DeriveBytes pbkdf2 = new Rfc2898DeriveBytes("P@ssw0rd2018", Encoding.ASCII.GetBytes(salt), ITERATIONS, HashAlgorithmName.SHA256);
var hash = String.Join("", pbkdf2.GetBytes(HASH_SIZE) ) ;
var base64Hash = System.Convert.ToBase64String(pbkdf2.GetBytes(HASH_SIZE));
Console.WriteLine(base64Hash);