diff --git a/MyProj/Program.cs b/MyProj/Program.cs index f0728ae..408544a 100644 --- a/MyProj/Program.cs +++ b/MyProj/Program.cs @@ -6,4 +6,16 @@ var myClassInstance = new MyClass { MyInt = 42, MyString = "Hello" }; string myClassJson = JsonConvert.SerializeObject(myClassInstance); -Console.WriteLine("Serialized MyClass JSON: " + myClassJson); \ No newline at end of file +Console.WriteLine("Serialized MyClass JSON: " + myClassJson); + +string password = GeneratePassword(); +Console.WriteLine("Generated Password: " + password); + +string GeneratePassword() +{ + // BAD: Password is generated using a cryptographically insecure RNG + Random gen = new Random(); + string password = "mypassword" + gen.Next(); + + return password; +} \ No newline at end of file