Пример #1
0
        public Form1()
        {
            InitializeComponent();
            numericUpDown1.Value = 4;
            var generator = new PasswordGenerator((int)numericUpDown1.Value);

            possibilities    = generator.Count();
            passwordLbl.Text = $"passwords: {possibilities:N0}";
        }
Пример #2
0
        private void numericUpDown1_ValueChanged(object sender, EventArgs e)
        {
            var generator = new PasswordGenerator((int)numericUpDown1.Value);

            possibilities    = generator.Count();
            passwordLbl.Text = $"passwords: {possibilities:N0}";

            if (textBoxPassword.Text.Trim().Length == (int)numericUpDown1.Value)
            {
                button1.Enabled = true;
            }
            else
            {
                button1.Enabled = false;
                hash            = "";
                password        = "";
            }
        }
Пример #3
0
        static void Main(string[] args)
        {
            string passWord = "******";
            String hash     = MD5Calculator.GetHash(passWord);

            Console.WriteLine($"Hash voor '{passWord}' = {hash}");

            var generator = new PasswordGenerator(8);

            Console.WriteLine($"\nAantal paswoorden van 8 hoofdletters: {generator.Count():N0}");
            Console.WriteLine($"\nEerste 10 paswoorden van 8 hoofdletters:\n");

            int count = 0;

            foreach (var password in generator)
            {
                Console.WriteLine($"{password}");
                count++;
                if (count == 10)
                {
                    break;
                }
            }



            icc.CollisionFound += CollisionHandler;



            icc.StartCalculatingMD5Collision(hash, 3);



            Console.WriteLine("\n\nPress <enter> to end");
            Console.ReadLine();
        }
Пример #4
0
        static void Main(string[] args)
        {
            string passWord = "******";
            String hash = MD5Calculator.GetHash(passWord);
            Console.WriteLine($"Hash voor '{passWord}' = {hash}");

            var generator = new PasswordGenerator(8);
            Console.WriteLine($"\nAantal paswoorden van 8 hoofdletters: {generator.Count():N0}");
            Console.WriteLine($"\nEerste 10 paswoorden van 8 hoofdletters:\n");

            int count = 0;
            foreach (var password in generator)
            {
                Console.WriteLine($"{password}");
                count++;
                if (count == 10) break;
            }
            

            Console.WriteLine("\n\nPress <enter> to end");
            Console.ReadLine();


        }
Пример #5
0
 public ulong MaxCount()
 {
     return(pg.Count());
 }
 /// <summary>
 /// Calculates the number of passwords
 /// </summary>
 /// <param name="characters"> number of characters </param>
 /// <returns> number of passwords </returns>
 public ulong NrOffPasswords(int characters)
 {
     PasswordGenerator p = new PasswordGenerator(characters);
     ulong n = p.Count();
     return n;
 }