Esempio n. 1
0
        private void GeneratePassword(string password, string serviceName, PasswordRequirements requirement)
        {
            PasswordGenerator generator = new PasswordGenerator(requirement);

            ViewModel.Password = generator.GeneratePassword(password, serviceName, 10);

            // store settings
            ServicePersistor.Persist(serviceName, requirement);
            ViewModel.PasswordVisible   = true;
            ViewModel.CreateNewPassword = true;

            IoCProviders.GetProvider <ICopyToClipboard>().CopyToClipboard(ViewModel.Password);
            IoCProviders.GetProvider <IProvideNotifications>().Notify(null, "Password has been copied to clipboard");
        }
        public string randomPassword()
        {
            PasswordGenerator generate = new PasswordGenerator();

            return(generate.generatePassword());
        }