Perhaps you could define some string-sequence patterns that are known to conform to the password policy. Select a pattern at random and then generate a string based on it. For example, a pattern "cdvaaa" might mean: consonant, digit, vowel, alpha, alpha, alpha."