public static void NewApplicationPassword(SecureString password)
        {
            GenerateAppPassword();
            EncryptedPassword result = new EncryptedPassword(cryptography.EncryptAppPassword(_appPassword.Password, password));

            _appPassword.Salt = result.Salt;
            if (!IOProxy.WritePassword(result, ".bak_key"))
            {
                OnAuthentificationComplete(new AuthentificationEventArgs(false));
            }
        }
        public static void NewMasterPassword(SecureString password, bool triggerCompleteEvent = true)
        {
            EncryptedPassword result = new EncryptedPassword(cryptography.EncryptMasterPassword(password));

            if (!IOProxy.WritePassword(result, ".key"))
            {
                OnAuthentificationComplete(new AuthentificationEventArgs(false));
            }
            NewApplicationPassword(password);
            if (triggerCompleteEvent)
            {
                OnAuthentificationComplete(new AuthentificationEventArgs());
            }
        }