Categories > Coding > C# >
C#Password Generator
Posted
Hi i saw a post on a python password Generator so I decided to make one in C#
Code:
Random random = new Random();
string[] characters = new[] { "P", "L", "A", "j", "d", "b", "q", "g", "u", "e", "w", "k", "l", "p", "l", "h", "v", "i", "m", "n", "f", "z", "a", "2", "5", "9", "1", "7", "8", "3", "4", "6", "&", "@", "#", "!", "^", ":", "=", "$" };
while (true)
{
Console.Write("\nPassword length:");
var passwordLength = Convert.ToInt32(Console.ReadLine());
Console.WriteLine();
for (int i = 0; i < passwordLength; i++)
{
Console.Write(characters[random.Next(characters.Length)]);
}
Console.Beep();
}
Replied
this code makes me want to do seppuku
Replied
someone *literally writes any code*
WRD: THIS CODE IS SO BAD I NEED BNELACH OMGOMGGOMGMO HOLY WATRE
Replied
@boyke My code's never been criticized on this platform. I think that's just skill issue :skull:
"Questionable intellegence, but I like the mystery" - CubeFaces
https://cdn.discordapp.com/attachments/908778288426651739/928478435066642492/siggy_1.png
Replied
@SeizureSalad Wasn't aware of .NET Core 7 but now that you're mentioning LINQ im definitely making the switch.
Replied
please stop making password generators
SynUI (Synapse X) | RiceCracker#7645
https://cdn.discordapp.com/attachments/1023423265160560745/1084114440720502865/synapse_x_render.png
Users viewing this thread:
( Members: 0, Guests: 1, Total: 1 )