예제 #1
0
        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);
            }
        }
예제 #2
0
        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;
            }
        }
예제 #3
0
 private void Form1_MouseMove(object sender, MouseEventArgs e)
 {
     ExtraEntropy.AddExtraEntropy(DateTime.Now.Ticks.ToString() + e.X + "," + e.Y);
 }
예제 #4
0
 private void timer1_Tick(object sender, EventArgs e)
 {
     ExtraEntropy.AddExtraEntropy(DateTime.Now.Ticks.ToString());
 }
예제 #5
0
 private void Form1_KeyDown(object sender, KeyEventArgs e)
 {
     ExtraEntropy.AddExtraEntropy(e.KeyCode.ToString() + e.KeyData + DateTime.Now.Ticks.ToString());
 }