Generate Passwords with Membership Provider
To solidly rip off DotNetRocks … today’s installment of “Better Know a Framework’s Methods”, we bring you the Generate Password method of the Membership class in System.Web.Security namespace.
public static string GeneratePassword( int length, int numberOfNonAlphanumericCharacters )
The method is clearly super simple to use, taking in an overall length of
password and count of non-alphanumeric characters to seed the password with.
I am sure there are all sorts of pitfalls to using this; but frankly, for a fast solution to generating passwords for zip files… this fits the bill nicely.