|
QtPass 1.7.0
Multi-platform GUI for pass, the standard unix password manager.
|
Abstract base class for password store operations. More...
#include <pass.h>
Signals | |
| void | error (QProcess::ProcessError) |
| Emitted when a process error occurs. | |
| void | startingExecuteWrapper () |
| Emitted before executing a command. | |
| void | statusMsg (const QString &msg, int timeout) |
| Emit status message. | |
| void | critical (const QString &title, const QString &message) |
| Emit critical error. | |
| void | processErrorExit (int exitCode, const QString &err) |
| Emitted on process error exit. | |
| void | finishedAny (const QString &out, const QString &err) |
| Emitted when any operation finishes. | |
| void | finishedGitInit (const QString &out, const QString &err) |
| Emitted when Git init finishes. | |
| void | finishedGitPull (const QString &out, const QString &err) |
| Emitted when Git pull finishes. | |
| void | finishedGitPush (const QString &out, const QString &err) |
| Emitted when Git push finishes. | |
| void | finishedShow (const QString &out) |
| Emitted when show finishes. | |
| void | finishedOtpGenerate (const QString &out) |
| Emitted when OTP generation finishes. | |
| void | finishedInsert (const QString &out, const QString &err) |
| Emitted when insert finishes. | |
| void | finishedRemove (const QString &out, const QString &err) |
| Emitted when remove finishes. | |
| void | finishedInit (const QString &out, const QString &err) |
| Emitted when init finishes. | |
| void | finishedMove (const QString &out, const QString &err) |
| Emitted when move finishes. | |
| void | finishedCopy (const QString &out, const QString &err) |
| Emitted when copy finishes. | |
| void | finishedGenerate (const QString &out, const QString &err) |
| Emitted when generate finishes. | |
| void | finishedGenerateGPGKeys (const QString &out, const QString &err) |
| Emitted when GPG key generation finishes. | |
| void | finishedGrep (const QList< QPair< QString, QStringList > > &results) |
| Emitted when grep finishes with matching results. | |
Public Member Functions | |
| Pass () | |
| Construct a Pass instance. | |
| void | init () |
| Initialize the Pass instance. | |
| virtual void | GitInit ()=0 |
| Initialize Git repository in password store. | |
| virtual void | GitPull ()=0 |
| Pull changes from remote Git repository. | |
| virtual void | GitPull_b ()=0 |
| Pull with rebase from remote. | |
| virtual void | GitPush ()=0 |
| Push changes to remote Git repository. | |
| virtual void | Show (QString file)=0 |
| Show decrypted password file. | |
| virtual void | OtpGenerate (QString file)=0 |
| Generate OTP for password file. | |
| virtual void | Insert (QString file, QString value, bool force)=0 |
| Insert or update password. | |
| virtual void | Remove (QString file, bool isDir)=0 |
| Remove password file or directory. | |
| virtual void | Move (const QString srcDir, const QString dest, const bool force=false)=0 |
| Move password file or directory. | |
| virtual void | Copy (const QString srcDir, const QString dest, const bool force=false)=0 |
| Copy password file or directory. | |
| virtual void | Init (QString path, const QList< UserInfo > &users)=0 |
| Initialize new password store. | |
| virtual void | Grep (QString pattern, bool caseInsensitive=false)=0 |
| Search password content for a pattern. | |
| virtual auto | generatePassword (unsigned int length, const QString &charset) -> QString |
| Generate random password. | |
| void | GenerateGPGKeys (QString batch) |
| Generate GPG keys using batch script. | |
| auto | listKeys (QStringList keystrings, bool secret=false) -> QList< UserInfo > |
| List GPG keys matching patterns. | |
| auto | listKeys (const QString &keystring="", bool secret=false) -> QList< UserInfo > |
| List GPG keys. | |
| void | updateEnv () |
| Update environment for subprocesses. | |
Static Public Member Functions | |
| static bool | gpgSupportsEd25519 () |
| Check if GPG supports Ed25519 encryption. | |
| static QString | getDefaultKeyTemplate () |
| Get default key template for new GPG keys. | |
| static auto | resolveGpgconfCommand (const QString &gpgPath) -> ResolvedGpgconfCommand |
| Resolve the gpgconf command to kill agents. | |
| static auto | getGpgIdPath (const QString &for_file) -> QString |
| Get .gpg-id file path for a password file. | |
| static auto | getRecipientList (const QString &for_file) -> QStringList |
| Get list of recipients for a password file. | |
| static auto | getRecipientString (const QString &for_file, const QString &separator=" ", int *count=nullptr) -> QStringList |
| Get recipients as string. | |
Protected Types | |
| using | PROCESS = Enums::PROCESS |
| Alias for Enums::PROCESS used throughout this class. | |
Protected Slots | |
| virtual void | finished (int id, int exitCode, const QString &out, const QString &err) |
| Handle process completion. | |
Protected Member Functions | |
| void | executeWrapper (PROCESS id, const QString &app, const QStringList &args, bool readStdout=true, bool readStderr=true) |
| Execute external wrapper command. | |
| auto | generateRandomPassword (const QString &charset, unsigned int length) -> QString |
| Generate random password from charset. | |
| auto | boundedRandom (quint32 bound) -> quint32 |
| Generate random number in range. | |
| void | setEnvVar (const QString &key, const QString &value) |
| Set or remove an environment variable. | |
| virtual void | executeWrapper (PROCESS id, const QString &app, const QStringList &args, QString input, bool readStdout=true, bool readStderr=true) |
| Execute wrapper with input. | |
Protected Attributes | |
| Executor | exec |
| Internal command executor for queuing and running subprocesses. | |
Abstract base class for password store operations.
Pass provides an abstraction layer for password management, supporting both the native 'pass' utility and gopass/imitation backends. It handles:
Subclasses must implement Git and password operations.
|
protected |
Alias for Enums::PROCESS used throughout this class.
|
protected |
Generate random number in range.
| bound | Upper bound (exclusive). |
|
pure virtual |
Copy password file or directory.
| srcDir | Source path. |
| dest | Destination path. |
| force | Overwrite existing. |
Implemented in ImitatePass, and RealPass.
|
signal |
Emit critical error.
| title | Error dialog title. |
| message | Error description. |
|
protected |
Execute external wrapper command.
| id | Process identifier. |
| app | Executable path. |
| args | Command arguments. |
| readStdout | Capture stdout. |
| readStderr | Capture stderr. |
|
protectedvirtual |
Execute wrapper with input.
| id | Process identifier. |
| app | Executable path. |
| args | Command arguments. |
| input | Input to pass to stdin. |
| readStdout | Capture stdout. |
| readStderr | Capture stderr. |
Reimplemented in ImitatePass.
|
protectedvirtualslot |
Handle process completion.
| id | Process identifier. |
| exitCode | Process exit code. |
| out | Standard output. |
| err | Standard error. |
Reimplemented in ImitatePass.
|
signal |
Emitted when any operation finishes.
| out | Standard output from the process. |
| err | Standard error from the process. |
|
signal |
Emitted when copy finishes.
| out | Standard output. |
| err | Standard error. |
|
signal |
Emitted when generate finishes.
| out | Standard output. |
| err | Standard error. |
|
signal |
Emitted when GPG key generation finishes.
| out | Standard output. |
| err | Standard error. |
|
signal |
Emitted when Git init finishes.
| out | Standard output. |
| err | Standard error. |
|
signal |
Emitted when Git pull finishes.
| out | Standard output. |
| err | Standard error. |
|
signal |
Emitted when Git push finishes.
| out | Standard output. |
| err | Standard error. |
|
signal |
Emitted when grep finishes with matching results.
| results | List of (entry path, matching lines) pairs. |
|
signal |
Emitted when init finishes.
| out | Standard output. |
| err | Standard error. |
|
signal |
Emitted when insert finishes.
| out | Standard output. |
| err | Standard error. |
|
signal |
Emitted when move finishes.
| out | Standard output. |
| err | Standard error. |
|
signal |
Emitted when OTP generation finishes.
| out | Generated OTP value. |
|
signal |
Emitted when remove finishes.
| out | Standard output. |
| err | Standard error. |
|
signal |
Emitted when show finishes.
| out | Decrypted password file content. |
| void Pass::GenerateGPGKeys | ( | QString | batch | ) |
Generate GPG keys using batch script.
| batch | GPG batch script content. |
|
virtual |
Generate random password.
| length | Password length. |
| charset | Character set to use. |
|
protected |
Generate random password from charset.
| charset | Character set. |
| length | Password length. |
|
static |
Get default key template for new GPG keys.
|
static |
Get .gpg-id file path for a password file.
| for_file | Path to password file. |
|
static |
Get list of recipients for a password file.
| for_file | Path to password file. |
|
static |
Get recipients as string.
| for_file | Path to password file. |
| separator | Separator between recipients. |
| count | Pointer to store recipient count. |
|
pure virtual |
Initialize Git repository in password store.
Implemented in ImitatePass, and RealPass.
|
pure virtual |
Pull changes from remote Git repository.
Implemented in ImitatePass, and RealPass.
|
pure virtual |
Pull with rebase from remote.
Implemented in ImitatePass, and RealPass.
|
pure virtual |
Push changes to remote Git repository.
Implemented in ImitatePass, and RealPass.
|
static |
Check if GPG supports Ed25519 encryption.
|
pure virtual |
Search password content for a pattern.
| pattern | Search pattern (regular expression). |
| caseInsensitive | true for case-insensitive search. |
Implemented in ImitatePass, and RealPass.
|
pure virtual |
Initialize new password store.
| path | Root of password store. |
| users | List of recipient GPG keys. |
Implemented in ImitatePass, and RealPass.
|
pure virtual |
Insert or update password.
| file | Path to password file. |
| value | Password content to store. |
| force | Overwrite existing file. |
Implemented in ImitatePass, and RealPass.
| auto Pass::listKeys | ( | const QString & | keystring = "", |
| bool | secret = false ) -> QList< UserInfo > |
List GPG keys.
| keystring | Search pattern. |
| secret | Include secret keys. |
| auto Pass::listKeys | ( | QStringList | keystrings, |
| bool | secret = false ) -> QList< UserInfo > |
List GPG keys matching patterns.
| keystrings | List of search patterns. |
| secret | Include secret keys. |
|
pure virtual |
Move password file or directory.
| srcDir | Source path. |
| dest | Destination path. |
| force | Overwrite existing. |
Implemented in ImitatePass, and RealPass.
|
pure virtual |
Generate OTP for password file.
| file | Path to password file. |
Implemented in ImitatePass, and RealPass.
|
signal |
Emitted on process error exit.
| exitCode | Process exit code. |
| err | Error message or stderr output. |
|
pure virtual |
Remove password file or directory.
| file | Path to remove. |
| isDir | true if removing a directory. |
Implemented in ImitatePass, and RealPass.
|
static |
Resolve the gpgconf command to kill agents.
| gpgPath | Path to gpg executable. |
|
protected |
Set or remove an environment variable.
| key | Variable name including trailing '='. |
| value | New value; empty string removes the variable. |
|
pure virtual |
Show decrypted password file.
| file | Path to password file relative to store root. |
Implemented in ImitatePass, and RealPass.
|
signal |
Emit status message.
| msg | Status text. |
| timeout | Display duration in milliseconds. |
|
protected |