28 December 2020

Extensions enhancement - IsStrong() method added

The .IsStrong() method was added to both the System.String and System.Text.StringBuilder objects.  It allows the developer the ability to quickly check if a string is a valid strong password e.g.

"blog.cjvandyk.com Rocks!".IsStrong()

will return True.  You can limit the number of aspect matches thus:

"blog.cjvandyk.com rocks!".IsStrong(3)

which returns True because 3 of the 4 aspects are matched in upper case, lower case and special characters.  Not passing an aspect number results in all 4 being required thus:

"blog.cjvandyk.com rocks!".IsStrong()

Will return False.


For a more detail of what Extensions offer, see:







Add Extensions to your toolbox and make your coding life a little easier.  

Happy coding
C

No comments:

Post a Comment

Comments are moderated only for the purpose of keeping pesky spammers at bay.

SharePoint Remote Event Receivers are DEAD!!!

 Well, the time has finally come.  It was evident when Microsoft started pushing everyone to WebHooks, but this FAQ and related announcement...