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