Skip to content

Instantly share code, notes, and snippets.

@christianp
Created June 7, 2012 21:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save christianp/2891557 to your computer and use it in GitHub Desktop.
Save christianp/2891557 to your computer and use it in GitHub Desktop.
Using random walks on regular expressions to generate passwords
Regular expressions are equivalent to finite state automata. (well, lookahead needs a pushdown automaton, but that's OK)
Describe password constraints using regular expressions.
Randomly traverse the FSA corresponding to a password constraint. A path ending in an accepting state is a valid password.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment