internal static Renewal Create(PasswordGenerator generator) { var ret = new Renewal { New = true, Id = ShortGuid.NewGuid().ToString() }; return(ret); }
internal static Renewal Create(string id, PasswordGenerator generator) { var ret = new Renewal { New = true, Id = string.IsNullOrEmpty(id) ? ShortGuid.NewGuid().ToString() : id, PfxPassword = generator.Generate() }; return(ret); }
internal static Renewal Create(string?id, int renewalDays, PasswordGenerator generator) { var ret = new Renewal { New = true, Id = string.IsNullOrEmpty(id) ? ShortGuid.NewGuid().ToString() : id, PfxPassword = new ProtectedString(generator.Generate()), RenewalDays = renewalDays }; return(ret); }
internal static Renewal Create(string?id, ScheduledTaskSettings settings, PasswordGenerator generator) { var ret = new Renewal { New = true, Id = string.IsNullOrEmpty(id) ? ShortGuid.NewGuid().ToString() : id, PfxPassword = new ProtectedString(generator.Generate()), Settings = settings }; return(ret); }