Commit 22a7540e authored by Mathieu Valois's avatar Mathieu Valois
Browse files

remove unused functions & add doc

parent 0400c168
Loading
Loading
Loading
Loading
+0 −35
Original line number Diff line number Diff line
@@ -39,11 +39,6 @@ public:
	Statsgen(){}
	Statsgen(const std::string& name);

	/**
	 * @brief show all options for the command
	 */
	void showHelp();

	/**
	 * @brief useful to hide statistics below 1%
	 * @param hr: 1 to hide, else 0
@@ -181,34 +176,4 @@ private:
	bool started = false;
};



/**
 * @brief Analyse a letter in a password
 * @param letter: current letter
 * @param last_simplemask: last analyzed part of the simple masks
 * @param simplemask_string: current simple mask
 * @param advancedmask_string: current advanced mask
 * @param policy: current number of digit, lower, upper and special for the current password
 * @param sizeAdvancedMask: size of the current advanced mask
 * @param sizeSimpleMask: size of the current simple mask
 */
// void analyse_letter(const char & letter, char & last_simplemask, std::string & simplemask_string, std::string & advancedmask_string, Policy & policy, int & sizeAdvancedMask, int & sizeSimpleMask);


/**
 * @brief Update minima and maxima of all general data from analysed passwords
 * with the analysed passwords
 * @param minMaxValue: save all minima and maxima
 * @param pol : policy of the last analyzed password
 */
void updateMinMax(minMax & minMaxValue, const Policy & pol);


/**
 * @brief Compute statistics by consumming password from a queue
 * @param threadarg : arguments required by the thread
 */
void * generate_stats_thread_queue(void * threadarg);

#endif
+5 −0
Original line number Diff line number Diff line
@@ -15,6 +15,11 @@ typedef std::unordered_map<int, uint64_t> IntOccurrence;
 * @brief minimal number of digits of a password, etc.
 */
struct minMax {
	/**
	 * @brief Update minima and maxima of all general data from analysed passwords
	 * with the analysed passwords
	 * @param m: other minMaxValue to merge with
	 */
	void updateMinMax(const minMax &m);
	bool operator==(const minMax& m) const;
	uint mindigit = UINT_MAX;