/// <summary> /// Set the master password. /// </summary> /// <param name="password">The master password.</param> public void SetMasterPassword(string password) { string hashedPassword = _securityService.HashData(password).Result; MasterSecret masterSecret = new MasterSecret() { Name = _cMasterSecretName, Password = hashedPassword, NumberOfAttemptsLeft = _cMaxNumberOfAttempts, LastAttempt = DateTime.Now, NumberOfAttemptsLeftBeforeLockout = _cMaxNumberOfAttemptsBeforeLockedOut }; _passwordRepository.SaveMasterSecret(masterSecret); }