Martchus/passwordmanager

A simple password manager

★ 17Forks 1C++GitHub ↗Compare

README

Password Manager

A simple password manager with Qt GUI and command-line interface using AES-256-CBC encryption via OpenSSL.

Features

  • Cross-platform: tested under GNU/Linux, Android and Windows
  • Qt Widgets GUI for desktop platforms
  • Qt Quick GUI (using Qt Quick Controls 2) for mobile platforms
  • Interactive command-line interface
  • Simple architecture: All data is stored in ordinary files with AES-256-CBC applied. No cloud stuff. Use e.g. Syncthing for synchronization.

Covered C++/Qt topics

I've mainly started this project to learn C++ and Qt programming. So besides the mentioned features, this project and the underlying libraries serve as an example project covering some interesting C++/Qt topics:

  • Basic use of Qt Widgets, Qt Quick and Qt Quick Controls 2
  • Creating custom Qt models
    • Nested model and model with multiple columns
    • Support Drag & Drop in QTreeView
    • Use of Qt Quick ListView and TreeView
    • Use of nested models within Qt QML
    • Integration with Qt Widgets' undo/redo framework
    • Filtering
  • Android specifics
    • Create APK via CMake (using androiddeployqt)
    • Customize activity
    • Customize gradle project to add additional Java dependency
    • Adjust the window style of the activity
    • Call Java function from C++ and vice versa
    • Show native file dialog
    • Open content:// URL with std::iostream
  • Windows specific issues
    • Open an std::iostream for files which have non-ASCII characters in the path
  • Use of zlib to (de)compress an in-memory buffer
  • Use of OpenSSL for symmetric (de)cryption and TOTP generation

Note that some of the mentioned points are actually implemented in the underlying libraries c++utilities, qtutilities and passwordfile.

Download

Source

See the release section on GitHub.

Packages and binaries

  • Arch Linux
  • Tumbleweed, Leap, Fedora
  • Other GNU/Linux systems
    • for generic, self-contained binaries check out the release section on GitHub
      • Requires glibc>=2.26, OpenGL and libX11
        • openSUSE Leap 15, Fedora 27, Debian 10, and Ubuntu 18.04 are recent enough (be sure the packages libglx0, libopengl0 and libegl1 are installed on Debian/Ubuntu)
      • Supports X11 and Wayland (set the environment variable QT_QPA_PLATFORM=xcb to disable native Wayland support if it does not work on your system)
      • Binaries are signed with the GPG key B9E36A7275FC61B464B67907E06FE8F53CDC6A4C.
  • Windows
  • Android
    • for APKs check out the release section on GitHub
      • These APKs can be easily installed and updated via Obtanium following this link.
      • The Android app requires Android 9 or later and a device with aarch64 or x86-64 CPU. Be sure to pick the correct download for your device (most likely 64-bit ARM).

Build instructions

The application depends on c++utilities and passwordfile and is built the same way as these libraries. For basic instructions check out the README file of c++utilities. When the Qt GUI is enabled, Qt and qtutilities are required, too.

To avoid building c++utilities/passwordfile/qtutilities separately, follow the instructions under "Building this straight". There's also documentation about various build variables which can be passed to CMake to influence the build.

Optional dependencies

  • When building any Qt GUI, the library qtutilities is required.
  • When building with Qt Widgets GUI support, the following Qt modules are required (version 5.6 or higher): Core, Gui, Widgets
  • When building with support for the experimental Qt Quick GUI, the following Qt modules are required (version 6.10 or higher): Core, Gui, Qml, Quick, Quick Controls 2
  • When building for Android at least Qt 6.9.0 is required.

To specify the major Qt version to use, set QT_PACKAGE_PREFIX (e.g. add -DQT_PACKAGE_PREFIX:STRING=Qt6 to the CMake arguments).

Building this straight

  1. Install (preferably the latest version of) the GCC toolchain or Clang, the required Qt modules, OpenSSL, iconv, zlib, CMake and Ninja.
  2. Get the sources of additional dependencies and the password manager itself. For the latest version from Git clone the following repositories:
    cd "$SOURCES"
    git clone https://github.com/Martchus/cpp-utilities.git c++utilities
    git clone https://github.com/Martchus/passwordfile.git
    git clone https://github.com/Martchus/qtutilities.git                  # only required for Qt GUI
    git clone https://github.com/Martchus/passwordmanager.git
    git clone https://github.com/Martchus/subdirs.git
    
  3. Build and install everything in one step:
    cd "$BUILD_DIR"
    cmake \
     -G Ninja \
     -DCMAKE_BUILD_TYPE=Release \
     -DCMAKE_INSTALL_PREFIX="/install/prefix" \
     -DQT_PACKAGE_PREFIX:STRING=Qt6 \
     -DBUILTIN_TRANSLATIONS:BOOL=ON \
     "$SOURCES/subdirs/passwordmanager"
    cmake --build .
    
    • If the install directory is not writable, do not conduct the build as root. Instead, set DESTDIR to a writable location (e.g. DESTDIR="temporary/install/dir" cmake --build .) and move the files from there to the desired location afterwards.
    • Especially for development it is more straight forward to use CMake presets.

Building without Qt GUI

It is possible to build without the GUI if only the CLI is needed. In this case no Qt dependencies (including qtutilities) are required.

To build without GUI, add the following parameters to the CMake call:

-DWIDGETS_GUI=OFF -DQUICK_GUI=OFF

Copyright notice and license

Copyright © 2015-2026 Marius Kittler

All code is licensed under GPL-2-or-later.

Attribution for 3rd party content

The builds found in the release section bundle icons from the KDE/Breeze project. None of these icons have been (intentionally) modified so no copyright for modifications is asserted.

Contributors

Martchusraj292

Issues