Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- private string GenerateRandomPassword()
- {
- byte[] buffer = new byte[5];
- Random rdm = new Random();
- rdm.NextBytes(buffer);
- return BitConverter.ToString(buffer).Replace("-","").ToLower();
- }
- private string GenerateRandomEmail()
- {
- IList<string> hosts = new List<string> { "gmail.com", "yahoo.com", "live.ca", "live.co.uk", "hotmail.com", "icloud.com" };
- byte[] buffer = new byte[5];
- Random rdm = new Random();
- rdm.NextBytes(buffer);
- string substr = BitConverter.ToString(buffer).Replace("-", "").ToLower();
- return string.Format("{0}@{1}",substr, hosts[rdm.Next(0, hosts.Count)]);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement