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()); } }