SHARE
TWEET

Untitled

a guest May 22nd, 2017 92 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.     public static class PasswordGenerator
  2.     {
  3.         private const string PasswordChars = "QWERTYUIOPASDFGHJKLZXCVBNMqwertyuiopasdfghjklzxcvbnm1234567890";
  4.  
  5.         public static string GetPassword()
  6.         {
  7.             var random = RandomHelper.GetRandom(); // or new Random(), if you ps-hack coder
  8.             var length = random.Next(10, 16);
  9.             var password = "";
  10.             while (length-- != 0) password += PasswordChars[random.Next(0, PasswordChars.Length - 1)];
  11.             return password;
  12.         }
  13.     }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top