Exemplo n.º 1
0
        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());
            }
        }