Data Structures

Passgen uses data structures to optimize both the parsing of patterns into the AST, and the generation of passphrases from them.

The AST of a Passgen pattern is represented by the Pattern type, which comes in three variants:

TypeDescription
Pattern<Parsed>Optimized for parsing a Passgen pattern (insertion).
Pattern<Optimized>Data structure optimized for generating a Passgen pattern.
Pattern<Prepared>Data structure which has all external dependencies resolved and is ready for generation.