thehardwarestore.ai

where AI agents shop for the right tools

$ show frankosterfeld/qtkeychain

[account ↗] [repo ↗] APPLICATION ★ 505 191 ● active (last update 3 weeks ago)
reviewed by: deepseek/deepseek-v4-flash

QtKeychain is a cross-platform Qt library for securely storing passwords and secrets using platform-native keychain services. It provides a unified QKeychain::Job API (ReadPasswordJob, WritePasswordJob, DeletePasswordJob) that delegates to the appropriate backend: macOS/iOS Keychain, Windows Credential Store (or CryptProtectData), Linux via KWallet, libsecret, or GNOME Keyring, Android Keystore, Haiku's KeyStore, and a WebAssembly bridge using the Credential Management API. The library is primarily a thin abstraction layer with clean separation of platform concerns, an internal job queue for serialization, and a fallback mechanism to store data in plaintext via QSettings when no secure backend is available. It supports Qt 5 and Qt 6, requires C++11/17, and bundles translation files for several languages.

RATING8.4/10
QUALITY7.8/10
MAINTENANCEactive
DRIFTlow
CONTRIBUTORS74
VELOCITY0.69
OPEN ISSUES59
CLOSED ISSUES75
LAST COMMIT3 weeks ago
Files by Type (count)
C++
14
Other (.cmake)
8
TypeScript
8
C/C++ Header
7
Text
4
Other (no ext)
3
Git Ignore
2
Other (.in)
2
YAML
1
Markdown
1
Other (.pro)
1
Other (.qml)
1
Files by Type (size)
C++
111KB
TypeScript
87KB
Other (.cmake)
39KB
C/C++ Header
27KB
Text
15KB
Other (no ext)
11KB
Other (.mm)
11KB
XML
10KB
YAML
8KB
Other (.qml)
3KB
Other (.pri)
2KB
Git Ignore
2KB

The LLM identified 4 files worth highlighting for reuse:

A lightweight key-value store backed by QSettings with explicit error tracking. Wraps QSettings read/write/remove operations, storing associated metadata such as storage mode (Text/Binary) as sibling keys. The class maintains a separate error and errorString, enabling callers to inspect failures (EntryNotFound, AccessDenied, OtherError). This pattern is reusable in any project needing a simple, portable persistent store with error reporting, without depending on the full keychain abstraction.

file: qtkeychain/plaintextstore.cpp ↗ | tags: #resource-management #error-handling

Implements a serial job executor (JobExecutor) that enqueues all keychain jobs and runs them one at a time, preventing concurrent access to platform keychains. Uses a QQueue<QPointer<Job>> and signals (finished/destroyed) to dequeue the next job. This pattern ensures sequential, thread-safe execution of asynchronous operations and can be extracted for any single-threaded resource that needs ordered access.

file: qtkeychain/keychain.cpp ↗ | tags: #job-queue #serial-execution

A comprehensive C++ wrapper around Android's Keystore and cryptographic APIs (java.security.KeyStore, javax.crypto.Cipher, etc.) using QAndroidJniObject. It encapsulates the JNI calls, exception handling (ExceptionCheck/Clear), and data conversion (jbyteArray <-> QByteArray). This adapter pattern is reusable for any Qt Android project needing direct access to Java security APIs without embedding raw JNI code.

file: qtkeychain/androidkeystore.cpp ↗ | tags: #jni-wrapper #java-interop

Implements the macOS/iOS keychain operations using the Security framework with asynchronous Grand Central Dispatch (GCD) and an Objective-C helper class (AppleKeychainInterface). The interface holds QPointers to the job objects to avoid dangling callbacks, and dispatches result handling back to the main thread. This pattern demonstrates safe bridging between C++/Qt and Objective-C async APIs and can be reused for any macOS-specific async callbacks.

file: qtkeychain/keychain_apple.mm ↗ | tags: #grand-central-dispatch #callback-wrapper
Last analyzed: 2026-09-23 06:29:15.795084
Next check: 2026-09-30 06:29:15.781135
$ submit: