This is a password generator and hasher using c++. The main part of it is the generator project, which is a static library. It contains a class PasswordGenerator that can be used to generate passwords.
The tests project uses Google Test to unit test the password generation. It may not be the best written unit tests, but they get the job done. The generator uses libsodium to hash its passwords as well as maintain memory safety (plaintext passwords generally shouldn't be in memory for too long).
At the project's current stage, it's basically a glorified libsodium wrapper, but I intend to add more features to it.
A sqlite database is used to keep track of passwords. Currently, its only used by the gui.
At this state, the project is really ready for usage but is definetly not primed for production. The generator project can statically link to any CMake project w/ git submodules.
Expect the API to change somewhat in the future (I'll try to maintain backwards compatability). The PasswordGenerator class itself mainly exists to generate passwords and hash passwords. It also maintains a password policy, which can be set by the user.
It contains fields like encryption strength, password length, use numbers, etc. Generator.h is the only file that needs to be included for now.
As for the cli project, it does work but is quite basic.
The gui does the main job which is generating passwords, hashing, and storing to a database. It is pretty much ready for use until I find some bugs, but I also plan to update it with features like resetting the database, etc.
The gui code needs a lot of refactoring 😔, which I will do. The gui also depends on sqlitecpp. The only file it manages is a PasswordGenDB.db file in the same dir as the executable.
The project uses CMake to build. It uses both CMake's FetchContent as well as vcpkg to download dependencies.
CMake looks for vcpkg based on a VCPKG_ROOT environment variable. You can change that in the outermost CMakeLists.txt file if needed. Otherwise, it uses cmake's FetchContent to download vcpkg, and sets VCPKG_ROOT to that dir instead of an env variable.
The only other reason I'm using FetchContent is for Google Test. It was a pain to use vcpkg with it, so I just used FetchContent.
But, libsodium is installed using vcpkg. Aside from all that, you should be able to just build the project normally using CMake without any arguments.
If you're using mingw, try setting your vcpkg triplet to -x64-mingw-static or dynamic, and in cmake options its:
-DVCPKG_TARGET_TRIPLET=x64-mingw-static. It's needed for vcpkg w/ wxWidgets.
CMakevcpkglibsodiumGoogle TestwxWidgetssqlitecpp