void UnlockVol() { FCXMono.Debug("Initiating open volume..."); FireCryptVolume FinalVolume; bool ValidVolume; string VolumeFileLocation = VolumePath; string fnwoext = Path.GetFileNameWithoutExtension(VolumeFileLocation); //filenamewithout extension string volN = Path.GetDirectoryName(VolumeFileLocation) + Path.DirectorySeparatorChar + fnwoext + ".vault" + Path.DirectorySeparatorChar + fnwoext + ".FireCrypt"; //dont change it before createvolume because it uses the older standard. VolumeFileLocation = volN; //point it to the actual .FireCrypt file. FireCryptVolume fcv = new FireCryptVolume(VolumeFileLocation); try { ValidVolume = true; FinalVolume = fcv; FCXMono.Debug("Volume opened successfully."); } catch (Exception e) { ValidVolume = false; Console.WriteLine("Volume opening was unsuccessful: {0}",e); } fcv.UnlockVolume(Password); Console.WriteLine("Vault unlocked to {0}",fcv.UnlockPath); }
void AddExistingToolStripMenuItemClick(object sender, EventArgs e) { var nvw = new FireCrypt.Wizards.NewVolumeWizard(true); nvw.ShowDialog(); if (nvw.FinalVolume != null) { FireCryptVolume nv = nvw.FinalVolume; cryptList.Items.Add(new CryptListItem(nv)); SaveCryptList(); } }
void AddExisting() { var nvw = new FireCrypt.Wizards.NewVolumeWizard(true); nvw.ShowDialog(); if (nvw.FinalVolume != null) { FireCryptVolume nv = nvw.FinalVolume; cryptList.Items.Add(new CryptListItem(nv)); SaveCryptList(); } }
void UpdateCurrentItem() { CryptListItem listItem = (CryptListItem)cryptList.Items[cryptList.SelectedIndex]; currentVolume = listItem.CryptVolume; label4.Text = currentVolume.Label; button3.Text = currentVolume.Unlocked ? "Lock Vault" : "Unlock Vault"; if (currentVolume.Unlocked) { } else { } }
void UpdateCurrentItem() { CryptListItem listItem = (CryptListItem)cryptList.Items[cryptList.SelectedIndex]; currentVolume = listItem.CryptVolume; label4.Text = string.Format("{0} [{1}]", currentVolume.Label, currentVolume.VolumeVersion); button3.Text = currentVolume.Unlocked ? "Lock Vault" : "Unlock Vault"; if (currentVolume.Unlocked) { } else { } }
void AddNew() { if (licenseLevel < 1) { MessageBox.Show("Demo licenses cannot create vaults. Upgrade to a trial or full license."); return; } var nvw = new FireCrypt.Wizards.NewVolumeWizard(false); nvw.ShowDialog(); if (nvw.FinalVolume != null) { FireCryptVolume nv = nvw.FinalVolume; cryptList.Items.Add(new CryptListItem(nv)); SaveCryptList(); } }
public CryptListItem(FireCryptVolume volume) { _internalVolume = volume; }
void CreateVol() { FCXMono.Debug("Initiating create volume..."); FireCryptVolume FinalVolume; bool ValidVolume; string VolumeFileLocation = VolumePath; string fnwoext = Path.GetFileNameWithoutExtension(VolumeFileLocation); //filenamewithout extension string volN = Path.GetDirectoryName(VolumeFileLocation) + Path.DirectorySeparatorChar + fnwoext + ".vault" + Path.DirectorySeparatorChar + fnwoext + ".FireCrypt"; FireCryptVolume.CreateNewVolume(VolumeFileLocation, VolumeLabel, Password, "1.0"); //dont change it before createvolume because it uses the older standard. VolumeFileLocation = volN; //point it to the actual .FireCrypt file. try { FireCryptVolume fcv = new FireCryptVolume(VolumeFileLocation); ValidVolume = true; FinalVolume = fcv; FCXMono.Debug("Volume created successfully."); } catch (Exception e) { ValidVolume = false; Console.WriteLine("Volume creation was unsuccessful: {0}",e); } }