Documentation
¶
Overview ¶
Package transform contains logic for transforming input maps
Index ¶
- func GenerateNGramMap(input map[string]int, wordRangeStart int, wordRangeEnd int, bypass bool, ...) map[string]int
- func MakePassphraseMap(input map[string]int, bypass bool, debug bool, wordRangeStart int, ...) map[string]int
- func TransformationController(input map[string]int, mode string, startingIndex int, endingIndex int, ...) (output map[string]int)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GenerateNGramMap ¶
func GenerateNGramMap(input map[string]int, wordRangeStart int, wordRangeEnd int, bypass bool, debug bool) map[string]int
GenerateNGramMap takes a map of keys and values and generates a new map using the utils.GenerateNGrams function and combines the results. This function is used to generate n-grams from the input map for the regram transformation mode.
Args:
input (map[string]int): The original map to generate n-grams from wordRangeStart (int): The starting number of words to use for n-grams wordRangeEnd (int): The ending iteration number of words to use for n-grams bypass (bool): If true, the map is not used for output or filtering debug (bool): If true, print additional debug information to stderr
Returns:
(map[string]int): A new map with the n-grams generated
func MakePassphraseMap ¶
func MakePassphraseMap(input map[string]int, bypass bool, debug bool, wordRangeStart int, wordRangeEnd int) map[string]int
MakePassphraseMap takes a map of keys and creates a new map with new passphrases for each key.
Args:
input (map[string]int): The original map to replace keys in use for constructing the passphrases bypass (bool): If true, the map is not used for output or filtering debug (bool): If true, print additional debug information to stderr wordRangeStart (int): The starting number of words to use for passphrases wordRangeEnd (int): The ending iteration number of words to use for passphrases
Returns:
(map[string]int): A new map with the keys replaced
func TransformationController ¶
func TransformationController(input map[string]int, mode string, startingIndex int, endingIndex int, verbose bool, replacementMask string, transformationFilesMap map[string]int, bypass bool, debug int, wordRangeStart int, wordRangeEnd int) (output map[string]int)
TransformationController is the main entry point for the CLI application. Operates a switch statement to determine the mode to use.
Args:
input (map[string]int): A map of input values mode (string): The mode to run the CLI in startingIndex (int): The starting index for the transformation if applicable endIndex (int): The ending index for the transformation if applicable verbose (bool): If true, the verbose information is printed when available replacementMask (string): The mask characters to use for masking operations transformationFilesMap (map[string]int): A map of transformation files to use for modes like retain-mask bypass (bool): If true, the map is not used for output or filtering debug (int): Different debug levels to use for debugging [0-2] wordRangeStart (int): The starting range for word operations wordRangeEnd (int): The ending range for word operations
Returns:
(map[string]int): A map of transformed values
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.