private void button1_Click(object sender, EventArgs e) { for (var x = 0; x < numKeysToMake.Value; x++) { EncryptionKeys key = new EncryptionKeys(); key.Password = crypt.CreatePassSalt(256); key.Salt = crypt.CreatePassSalt(15); key.XorKey = crypt.CreateXOR_Pass(Rando.GetNumber(256).ToString()); // instead of a username we'll just use int for XOR key key.VlKey = crypt.Create15VIPassword(15); ClientConfig.EncryptionKeys.Add(key); // Add to client key list } MessageBox.Show($"{ClientConfig.EncryptionKeys.Count} custom keys now stored!"); this.Close(); }
private void btnGenerateKeys_Click(object sender, EventArgs e) { CryptoTool crypt = new CryptoTool(); // Generate 10 keys by default for (var x = 0; x < 10; x++) { EncryptionKeys key = new EncryptionKeys(); key.Password = crypt.CreatePassSalt(256); key.Salt = crypt.CreatePassSalt(15); key.XorKey = crypt.CreateXOR_Pass(Rando.GetNumber(256).ToString()); // instead of a username we'll just use int for XOR key // We'll leave the VI alone ClientConfig.EncryptionKeys.Add(key); // Add to client key list } }