Strong Passwords

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi

I'm in the process of writing a program to ensure that a user will setup a
strong password for a particular application. One of the requirements is:-

A Strong Password must include characters from at least three of the
following four categories...
Uppercase characters (A though Z)
Lowercase characters (a though z)
Numeric digits (0 through 9)
Non-alphanumeric characters (!, $, #, %, etc.)

Does anybody know of a vb class, api or addin that can do this?

thanks
 
Hi,

You can use a regular expression for that.

http://www.regexlib.com/REDetails.aspx?regexp_id=1111

Dim regStrongPassword As New
System.Text.RegularExpressions.Regex("(?=^.{6,10}$)(?=.*\d)(?=.*[a-z])(?=.*[A-Z])(?=.*[!@#$%^&*()_+}{"":;'?/>.<,])(?!.*\s).*$")
Trace.WriteLine(regStrongPassword.IsMatch("1A2a$5"))
Trace.WriteLine(regStrongPassword.IsMatch("apple"))


Ken
 
jez123456 said:
Hi

I'm in the process of writing a program to ensure that a user will setup a
strong password for a particular application. One of the requirements is:-

A Strong Password must include characters from at least three of the
following four categories...
Uppercase characters (A though Z)
Lowercase characters (a though z)
Numeric digits (0 through 9)
Non-alphanumeric characters (!, $, #, %, etc.)

Does anybody know of a vb class, api or addin that can do this?

thanks

you may as well try Regular expressions
the pain of learning it will be well worth the trouble.
you can save many lines of <future> code - (however obfusicated it may look)
(its the beer that made Perl famous )
I think that's where the term "Swiss Army Chain Saw" was earned.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top