Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Guid.NewGuid().ToString("d").Substring(1,8)
- public string CreatePassword(int length)
- {
- string valid = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890";
- string res = "";
- Random rnd = new Random();
- while (0 < length--)
- res += valid[rnd.Next(valid.Length)];
- return res;
- }
- string[] words = { 'bur', 'ler', 'meh', 'ree' };
- string word = "";
- Random rnd = new Random();
- for (i = 0; i < 3; i++)
- word += words[rnd.Next(words.length)]
- int numbCount = rnd.Next(4);
- for (i = 0; i < numbCount; i++)
- word += (2 + rnd.Next(7)).ToString();
- return word;
- string password = Guid.NewGuid().ToString().ToLower()
- .Replace("-", "").Replace("l", "").Replace("1", "").Replace("o", "").Replace("0","")
- .Substring(0,10);
Add Comment
Please, Sign In to add comment