private void btnBrowseOutput_Click(object sender, EventArgs e) { DialogResult result = sfdOutputFile.ShowDialog(); if (result == System.Windows.Forms.DialogResult.OK) { txtOutputFile.Text = sfdOutputFile.FileName; btnFirstPrototype.Enabled = true; ExtraEntropy.AddExtraEntropy(txtOutputFile.Text); } }
private void btnBrowseTemplate_Click(object sender, EventArgs e) { DialogResult result = ofdLoadBundle.ShowDialog(); if (result == System.Windows.Forms.DialogResult.OK) { txtTemplateFilePath.Text = ofdLoadBundle.FileName; FileInfo info = new FileInfo(txtTemplateFilePath.Text); // harvest some free bonus entropy from the size, filepath, and last access time of the selected template ExtraEntropy.AddExtraEntropy(info.Length.ToString() + txtTemplateFilePath.Text + info.LastAccessTimeUtc.ToLongTimeString()); // note: this is NOT the only entropy in use - it just pleases me to put some extra in there because we can try { bundle = new WalletBundle(txtTemplateFilePath.Text); } catch (Exception ex) { MessageBox.Show("Failed to load bundle file\n" + ex.ToString(), "Load Error", MessageBoxButtons.OK, MessageBoxIcon.Error); return; } txtTemplateDescription.Text = bundle.template.TemplateDescription; if (bundle.template.CoinIsWIFstupid) { lblTemplateInfo.Text = string.Format("Loaded wallet for coin '{0}', which uses Address Version {1} with WIF-stupid mode", bundle.template.CoinName, bundle.template.CoinAddressType); } else { lblTemplateInfo.Text = string.Format("Loaded wallet for coin '{0}', which uses Address Version {1}", bundle.template.CoinName, bundle.template.CoinAddressType); } btnBrowseOutput.Enabled = true; } }
private void Form1_MouseMove(object sender, MouseEventArgs e) { ExtraEntropy.AddExtraEntropy(DateTime.Now.Ticks.ToString() + e.X + "," + e.Y); }
private void timer1_Tick(object sender, EventArgs e) { ExtraEntropy.AddExtraEntropy(DateTime.Now.Ticks.ToString()); }
private void Form1_KeyDown(object sender, KeyEventArgs e) { ExtraEntropy.AddExtraEntropy(e.KeyCode.ToString() + e.KeyData + DateTime.Now.Ticks.ToString()); }