Reputation: 3391
I need to check if the password for an user that will be created later on in an installation process will be valid. That is, whether it will conform to the OS validation rules. Is there an API call to check if a given password will be valid? This is on Windows
Upvotes: 2
Views: 587
Reputation: 689
Windows 7 Help says that in password any characters can be used:
a..z
A..Z
0..9
` ~ ! @ # $ % ^ & * ( ) _ - + = { } [ ] \ | : ; " ' < > , . ? /
and space.
Read here: http://windows.microsoft.com/en-GB/windows7/Tips-for-creating-strong-passwords-and-passphrases
Maybe it is possible to use regular expression to check the password.
Upvotes: 0
Reputation: 76218
You're looking for NetValidatePasswordPolicy
function.
This can check against the local OS password policy too.
Upvotes: 2