/// <param name="length"></param> /// <param name="requiredSets">The sets characters that the password must contain</param> /// <param name="predicate">An arbitrary function that the password must match</param> public static string GenerateComplex(int length, IReadOnlyCollection <HashSet <char> > requiredSets, Func <string, bool> predicate) { using (var random = new CryptoServiceRandom()) { return(GenerateComplex(length, requiredSets, predicate, random)); } }
public static string Generate(int length, IReadOnlyCollection <ISet <char> > requiredSets, Func <string, bool> predicate) { using (var random = new CryptoServiceRandom()) { return(Generate(length, requiredSets, predicate, random, EmbeddedTrigramStatistics.Instance)); } }
/// <param name="length"></param> /// <param name="allowed">The set of characters the password will be randomly made of</param> public static string Generate(int length, HashSet <char> allowed) { using (var random = new CryptoServiceRandom()) { return(Generate(length, allowed, random)); } }