"Fossies" - the Fresh Open Source Software Archive

Member "src/Main/Forms/VolumePasswordPanel.h" (10 Oct 2018, 3568 Bytes) of package /windows/misc/VeraCrypt_1.23-Hotfix-2_Source.zip:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) C and C++ source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file. For more information about "VolumePasswordPanel.h" see the Fossies "Dox" file reference documentation.

    1 /*
    2  Derived from source code of TrueCrypt 7.1a, which is
    3  Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed
    4  by the TrueCrypt License 3.0.
    5 
    6  Modifications and additions to the original source code (contained in this file)
    7  and all other portions of this file are Copyright (c) 2013-2017 IDRIX
    8  and are governed by the Apache License 2.0 the full text of which is
    9  contained in the file License.txt included in VeraCrypt binary and source
   10  code distribution packages.
   11 */
   12 
   13 #ifndef TC_HEADER_Main_Forms_PasswordPanel
   14 #define TC_HEADER_Main_Forms_PasswordPanel
   15 
   16 #include "Forms.h"
   17 #include "Platform/Functor.h"
   18 #include "Main/Main.h"
   19 
   20 namespace VeraCrypt
   21 {
   22     class VolumePasswordPanel : public VolumePasswordPanelBase
   23     {
   24     public:
   25         VolumePasswordPanel (wxWindow* parent, MountOptions* options, shared_ptr <VolumePassword> password, bool disableTruecryptMode, shared_ptr <KeyfileList> keyfiles, bool enableCache = false, bool enablePassword = true, bool enableKeyfiles = true, bool enableConfirmation = false, bool enablePkcs5Prf = false, bool isMountPassword = false, const wxString &passwordLabel = wxString());
   26         virtual ~VolumePasswordPanel ();
   27 
   28         void AddKeyfile (shared_ptr <Keyfile> keyfile);
   29         shared_ptr <KeyfileList> GetKeyfiles () const { return UseKeyfilesCheckBox->IsChecked() ? Keyfiles : shared_ptr <KeyfileList> (); }
   30         shared_ptr <VolumePassword> GetPassword () const;
   31         shared_ptr <Pkcs5Kdf> GetPkcs5Kdf (bool &bUnsupportedKdf) const;
   32         shared_ptr <Pkcs5Kdf> GetPkcs5Kdf (bool bTrueCryptMode, bool &bUnsupportedKdf) const;
   33         int GetVolumePim () const;
   34         bool GetTrueCryptMode () const;
   35         void SetTrueCryptMode (bool trueCryptMode);
   36         int GetHeaderWipeCount () const;
   37         void SetCacheCheckBoxValidator (const wxGenericValidator &validator) { CacheCheckBox->SetValidator (validator); }
   38         void SetFocusToPasswordTextCtrl () { PasswordTextCtrl->SetSelection (-1, -1); PasswordTextCtrl->SetFocus(); }
   39         void SetFocusToPimTextCtrl () { VolumePimTextCtrl->SetSelection (-1, -1); VolumePimTextCtrl->SetFocus(); }
   40         void SetVolumePim (int pim);
   41         bool PasswordsMatch () const;
   42         void EnableUsePim () { PimCheckBox->Enable (true); PimCheckBox->Show (true); }
   43         bool IsUsePimChecked () const { return PimCheckBox->GetValue (); }
   44         void SetUsePimChecked (bool checked) const { PimCheckBox->SetValue (checked); }
   45         bool UpdatePimHelpText (bool pimChanged);
   46 
   47         Event UpdateEvent;
   48 
   49     protected:
   50         void SetPimValidator ();
   51         void DisplayPassword (bool display, wxTextCtrl **textCtrl, int row);
   52         shared_ptr <VolumePassword> GetPassword (wxTextCtrl *textCtrl) const;
   53         void OnAddKeyfileDirMenuItemSelected (wxCommandEvent& event);
   54         void OnAddKeyfilesMenuItemSelected (wxCommandEvent& event);
   55         void OnAddSecurityTokenSignatureMenuItemSelected (wxCommandEvent& event);
   56         void OnDisplayPasswordCheckBoxClick (wxCommandEvent& event);
   57         void OnKeyfilesButtonClick (wxCommandEvent& event);
   58         void OnKeyfilesButtonRightClick (wxMouseEvent& event);
   59         void OnKeyfilesButtonRightDown (wxMouseEvent& event);
   60         void OnTextChanged (wxCommandEvent& event) { OnUpdate(); }
   61         void OnPimChanged  (wxCommandEvent& event) { OnUpdate(); }
   62         void OnUsePimCheckBoxClick( wxCommandEvent& event );
   63         void OnUpdate () { UpdateEvent.Raise(); }
   64         void OnUseKeyfilesCheckBoxClick (wxCommandEvent& event) { OnUpdate(); }
   65         void WipeTextCtrl (wxTextCtrl *textCtrl);
   66         void OnTrueCryptModeChecked( wxCommandEvent& event );
   67 
   68         shared_ptr <KeyfileList> Keyfiles;
   69         shared_ptr <Functor> UpdateCallback;
   70         bool EnablePimEntry;
   71     };
   72 }
   73 
   74 #endif // TC_HEADER_Main_Forms_PasswordPanel