コード例 #1
0
        private void CreatePasswordManagerInstance(byte[] aesKey, byte[] aesIV)
        {
            ICrypt aesCrypt  = new AesCrypt(aesKey, aesIV);
            ICrypt byteShift = new ByteShifter(4190, "vmqup4amöovcb86mnoöbsaen");
            ICredentialsStore <ICollection <CredentialGroup> > store = new CredentialFileStore(_storeFile, new [] { aesCrypt, byteShift });

            _manager = new PasswordSafe(store);
            ((PasswordSafe)_manager).OnCommandExecuted += MainWindow_OnCommandExecuted;
        }
コード例 #2
0
        public CredentialsEditor(IPasswordSafe passwordManager, CredentialGroup credentialGroup)
        {
            InitializeComponent();
            DoMagic();
            SetInstance(passwordManager);

            _credential      = new Credential();
            _credentialGroup = credentialGroup;
        }
コード例 #3
0
 public WebsitesController(
     ApplicationDbContext context,
     ISaveHomepageSnapshotToDiskHandler saveSnapshot,
     IPasswordSafe passwordSafe)
 {
     _context      = context;
     _saveSnapshot = saveSnapshot;
     _passwordSafe = passwordSafe;
 }
コード例 #4
0
        public EditGroupDialog(IPasswordSafe passwordManager, CredentialGroup group)
        {
            InitializeComponent();
            DoMagic();
            _passwordManager = passwordManager;

            EditedGroup = group;
            _group      = (CredentialGroup)group.Clone();

            tbGroupName.Text = _group.Name;
        }
コード例 #5
0
        private void SetInstance(IPasswordSafe passwordManager)
        {
            _passwordAnalyzer = new StandardPasswordAnalyzer();
            _passwordManager  = passwordManager;

            Strength.Visible = false;
            AcceptButton     = null;

            if (ColorScheme == WindowColorSchemes.Dark)
            {
                Strength.BackColor = Color.FromArgb(0, 176, 69);
            }
        }
コード例 #6
0
        public CredentialsEditor(IPasswordSafe passwordManager, Credential credential)
        {
            InitializeComponent();
            DoMagic();
            SetInstance(passwordManager);

            EditedCredential = credential;
            _credential      = (Credential)credential.Clone();

            tbName.Text     = _credential.Name;
            tbUrl.Text      = _credential.URL;
            tbUsername.Text = _credential.Username;
            tbPassword.Text = _credential.Password;
            tbNotes.Text    = _credential.Notes;
        }
コード例 #7
0
 public EditGroupDialog(IPasswordSafe passwordManager)
 {
     InitializeComponent();
     DoMagic();
     _passwordManager = passwordManager;
 }