示例#1
0
		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);
		}
示例#2
0
        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();
            }
        }
示例#3
0
        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();
            }
        }
示例#4
0
        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
            {
            }
        }
示例#5
0
        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
            {
            }
        }
示例#6
0
        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();
            }
        }
示例#7
0
 public CryptListItem(FireCryptVolume volume)
 {
     _internalVolume = volume;
 }
示例#8
0
		public CryptListItem(FireCryptVolume volume)
		{
			_internalVolume = volume;
		}
示例#9
0
		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
			{
				
			}
		}
示例#10
0
		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);
			}
		}