#include "word_list_generator.h" #include #include #include const std::string WordListGenerator::charset_ = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"; std::vector WordListGenerator::generate() { const size_t multiplier = 10; std::vector result; result.reserve(multiplier * std::pow(charset_.length(), 4)); for (auto char_1 : charset_) { for (auto char_2 : charset_) { for (auto char_3 : charset_) { for (auto char_4 : charset_) { for (auto i = 0; i < multiplier; ++i) { result.emplace_back( std::initializer_list({char_1, char_2, char_3, char_4})); } } } } } std::random_device random_device; std::mt19937 random_number_generator(random_device()); std::shuffle(result.begin(), result.end(), random_number_generator); return result; }