public void Decrypt(string password, string login)
        {
            string saltKey           = CryptographyService.Decrypt(Passwords.SaltKey, password, Passwords.VIKey, login);
            string encryptedLogin    = CryptographyService.Encrypt(login, password, Passwords.VIKey, saltKey);
            string encryptedPassword = CryptographyService.Encrypt(password, login, Passwords.VIKey, saltKey);

            ObservableCollection <string> pswdCollection = new ObservableCollection <string>();

            pswdCollection = CryptographyService.Decrypt(Passwords.Collection, password, saltKey, login); //salt
            Passwords      = new Passwords(login, password, saltKey, Passwords.VIKey, pswdCollection);
        }
        public void Encrypt()
        {
            string mainPassword = CryptographyService.Encrypt(Passwords.MainPassword,
                                                              Passwords.Login, Passwords.VIKey, Passwords.SaltKey);
            string login = CryptographyService.Encrypt(Passwords.Login, Passwords.MainPassword,
                                                       Passwords.VIKey, Passwords.SaltKey);
            string saltKey = CryptographyService.Encrypt(Passwords.SaltKey, Passwords.MainPassword,
                                                         Passwords.VIKey, Passwords.Login);

            ObservableCollection <string> pswCollection =
                CryptographyService.Encrypt(
                    Passwords.Collection, Passwords.MainPassword, Passwords.SaltKey, Passwords.Login); //salt

            Passwords = new Passwords(login, mainPassword, saltKey, Passwords.VIKey, pswCollection);
        }
 public void Load(string fileName)
 {
     Passwords = BinaryIOService.Load(fileName) as Passwords;
 }
 public PasswordProvider(Passwords passwordObject)
 {
     Passwords = passwordObject;
 }