public static PasswordHash Create(string password)
{
// Generate a random salt
var csprng = new RNGCryptoServiceProvider();
var salt = new byte[SaltBytes];
csprng.GetBytes(salt);
// Hash the password and encode the parameters
var hash = PBKDF2(password, salt, HashIterations, HashBytes);
return new PasswordHash(hash, salt);
}