in reply to Minimal password check, again

I'm not sure how to manage the patterns but you can do some simple comparisons to catch the too many p's and only c's and a's.

Basicaly just do a kind of statistical analysis. Count all the different letters and store the value for each. Total that and then make sure that no one char is above your threshold for percentage of the whole. Then count the total number of different chars and make sure that is above your threshold. That should in theory eliminate the simple patterns to start with. You could also then require that no two (or three) letters have the same percentage of the whole (since that would be the case with repeating patterns.)

I could include some code in that if you need it.

___________
Eric Hodges