Categories > Coding > C# >

C#Password Generator

Posts: 205

Threads: 18

Joined: Sep, 2022

Reputation: 17

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

}

  • 0

Posts: 1478

Threads: 95

Joined: Oct, 2019

Reputation: 103

Replied

This Is Truly Horrifying. This Invokes PTSD

  • 1

Posts: 0

Threads: 0

Joined: ?

Reputation:

Replied

this code makes me want to do seppuku 

  • 0

SeizureSalad

i love femboys

Posts: 1159

Threads: 79

Joined: Mar, 2021

Reputation: 40

Replied

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

  • 0

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

https://cdn.discordapp.com/attachments/1136067487847415848/1138948596679589898/sig.png

RiceUsesArchBtw

rice cracker

vip

Posts: 465

Threads: 19

Joined: Aug, 2021

Reputation: 39

Replied

please stop making password generators

  • 0

https://cdn.discordapp.com/attachments/1023423265160560745/1132948683747500092/Frame_12x.png

Users viewing this thread:

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