Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Force to use strong password
Message
From
06/11/2006 13:23:07
 
 
To
06/11/2006 13:04:43
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 9 SP1
Miscellaneous
Thread ID:
01167371
Message ID:
01167379
Views:
9
>I need to allow users to enter only strong passwords.
>
>I think the best rule of strongness is
>
>1. Password must be at least 6 characters long
>
>2.Password must contain at least one uppercase, at least one lowercase letter and at least one number.
>
>Where to find VFP code which implements this or similar password strongness check ?

If you mean in a VFP app, it should be pretty easy. Spin through the string, looking at each character. Keep a running count of how many are ISDIGIT(), ISUPPER() and ISLOWER(). You have a strong password if:

( LEN() >= 6 ) AND( DigitCount >= 1 ) AND ( NonDigitCount >= 2 ) AND ( UpperCount >= 1 ) AND ( LowerCount >= 1 )
Regards. Al

"Violence is the last refuge of the incompetent." -- Isaac Asimov
"Never let your sense of morals prevent you from doing what is right." -- Isaac Asimov

Neither a despot, nor a doormat, be

Every app wants to be a database app when it grows up
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform