using System.Security.Cryptography;
public static void Main()
Console.WriteLine(GenerateRandomSimplePassword());
private static readonly RNGCryptoServiceProvider Rng = new RNGCryptoServiceProvider();
internal static string GenerateRandomSimplePassword()
var seedBytes = new byte[4];
int seed = BitConverter.ToInt32(seedBytes, 0);
var rnd = new Random(seed);
return CreateMD5(rnd.Next().ToString()).Substring(1, 7);
string CreateMD5(string input)
using (MD5 md5 = MD5.Create())
byte[] inputBytes = Encoding.ASCII.GetBytes(input);
byte[] hashBytes = md5.ComputeHash(inputBytes);
var sb = new StringBuilder();
foreach (byte b in hashBytes)
sb.Append(b.ToString("X2"));