Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

password generator

public string CreatePassword(int length)
{
  const string valid = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890<>.,/@#$%^&*()_+!:";
  StringBuilder res = new StringBuilder();
  Random rnd = new Random();
  while (0 < length--)
  {
    res.Append(valid[rnd.Next(valid.Length)]);
  }
  return res.ToString();
}
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #password #generator
ADD COMMENT
Topic
Name
5+6 =