Categories > Coding > C# >

C#Password Generator


New Reply

Posts: 158

Threads: 15

Joined: Sep, 2022

Reputation: 11

  • 0

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();

}

Posts: 1318

Threads: 84

Joined: Oct, 2019

Reputation: 95

  • 1

Replied

This Is Truly Horrifying. This Invokes PTSD

Posts: 0

Threads: 0

Joined: ?

Reputation:

  • 0

Replied

this code makes me want to do seppuku 

Posts: 915

Threads: 19

Joined: May, 2021

Reputation: 44

  • 0

Replied

someone *literally writes any code*

 

WRD: THIS CODE IS SO BAD I NEED BNELACH OMGOMGGOMGMO HOLY WATRE

Posts: 1486

Threads: 76

Joined: Feb, 2020

Reputation: 82

  • 0

Replied

@boyke My code's never been criticized on this platform. I think that's just skill issue :skull:

SeizureSalad

i love femboys

Mention

Posts: 1027

Threads: 67

Joined: Mar, 2021

Reputation: 36

  • 0

Replied

@87922 while yes it's slow but in .NET 7 i think they made it stupid faster so who tf cares

"Questionable intellegence, but I like the mystery" - CubeFaces

https://cdn.discordapp.com/attachments/908778288426651739/928478435066642492/siggy_1.png

Posts: 1486

Threads: 76

Joined: Feb, 2020

Reputation: 82

  • 0

Replied

@SeizureSalad Wasn't aware of .NET Core 7 but now that you're mentioning LINQ im definitely making the switch.

Posts: 350

Threads: 11

Joined: Aug, 2021

Reputation: 31

  • 0

Replied

please stop making password generators

SynUI (Synapse X) | RiceCracker#7645


https://cdn.discordapp.com/attachments/1023423265160560745/1084114440720502865/synapse_x_render.png


New Reply

Users viewing this thread:


( Members: 0, Guests: 1, Total: 1 )