|
QtPass 1.6.0
Multi-platform GUI for pass, the standard unix password manager.
|
Implementation of Pass that wraps the 'pass' command-line tool. More...
#include <realpass.h>
Public Member Functions | |
| RealPass () | |
| Construct a RealPass instance. | |
| ~RealPass () override=default | |
| Destructor. | |
| void | GitInit () override |
| Initialize Git repository in password store. | |
| void | GitPull () override |
| Pull changes from remote. | |
| void | GitPull_b () override |
| Pull with rebase. | |
| void | GitPush () override |
| Push changes to remote. | |
| void | Show (QString file) override |
| Show decrypted password. | |
| void | OtpGenerate (QString file) override |
| Generate OTP code. | |
| void | Insert (QString file, QString newValue, bool overwrite=false) override |
| Insert new password. | |
| void | Remove (QString file, bool isDir=false) override |
| Remove password or directory. | |
| void | Init (QString path, const QList< UserInfo > &users) override |
| Initialize password store. | |
| void | Move (const QString src, const QString dest, const bool force=false) override |
| Move password file or directory. | |
| void | Copy (const QString src, const QString dest, const bool force=false) override |
| Copy password file or directory. | |
| Public Member Functions inherited from Pass | |
| Pass () | |
| Construct a Pass instance. | |
| void | init () |
| Initialize the Pass instance. | |
| ~Pass () override=default | |
| 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. | |
Additional Inherited Members | |
| Signals inherited from Pass | |
| void | error (QProcess::ProcessError) |
| Emitted when a process error occurs. | |
| void | startingExecuteWrapper () |
| Emitted before executing a command. | |
| void | statusMsg (const QString &, int) |
| Emit status message. | |
| void | critical (const QString &, const QString &) |
| Emit critical error. | |
| void | processErrorExit (int exitCode, const QString &err) |
| Emitted on process error exit. | |
| void | finishedAny (const QString &, const QString &) |
| Emitted when any operation finishes. | |
| void | finishedGitInit (const QString &, const QString &) |
| Emitted when Git init finishes. | |
| void | finishedGitPull (const QString &, const QString &) |
| Emitted when Git pull finishes. | |
| void | finishedGitPush (const QString &, const QString &) |
| Emitted when Git push finishes. | |
| void | finishedShow (const QString &) |
| Emitted when show finishes. | |
| void | finishedOtpGenerate (const QString &) |
| Emitted when OTP generation finishes. | |
| void | finishedInsert (const QString &, const QString &) |
| Emitted when insert finishes. | |
| void | finishedRemove (const QString &, const QString &) |
| Emitted when remove finishes. | |
| void | finishedInit (const QString &, const QString &) |
| Emitted when init finishes. | |
| void | finishedMove (const QString &, const QString &) |
| Emitted when move finishes. | |
| void | finishedCopy (const QString &, const QString &) |
| Emitted when copy finishes. | |
| void | finishedGenerate (const QString &, const QString &) |
| Emitted when generate finishes. | |
| void | finishedGenerateGPGKeys (const QString &, const QString &) |
| Emitted when GPG key generation finishes. | |
| Static Public Member Functions inherited from Pass | |
| 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 inherited from Pass | |
| using | PROCESS = Enums::PROCESS |
| Protected Slots inherited from Pass | |
| virtual void | finished (int id, int exitCode, const QString &out, const QString &err) |
| Handle process completion. | |
| Protected Member Functions inherited from Pass | |
| 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. | |
| 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 inherited from Pass | |
| Executor | exec |
Implementation of Pass that wraps the 'pass' command-line tool.
RealPass delegates all password store operations to the external 'pass' utility. It provides a Qt-native interface while handling:
This is the primary implementation when 'pass' is available on the system.
Definition at line 21 of file realpass.h.
|
default |
Construct a RealPass instance.
|
overridedefault |
Destructor.
|
overridevirtual |
Copy password file or directory.
RealPass::Copy copy a file (or folder).
| src | Source path. |
| dest | Destination path. |
| force | Overwrite existing. |
| src | source file or folder |
| dest | destination file or folder |
| force | overwrite |
Implements Pass.
Definition at line 162 of file realpass.cpp.
|
overridevirtual |
Initialize Git repository in password store.
RealPass::GitInit pass git init wrapper.
Implements Pass.
Definition at line 29 of file realpass.cpp.
|
overridevirtual |
Pull changes from remote.
RealPass::GitPull pass git pull wrapper.
Implements Pass.
Definition at line 48 of file realpass.cpp.
|
overridevirtual |
Pull with rebase.
RealPass::GitInit pass git pull wrapper which blocks until process finishes.
Implements Pass.
Definition at line 35 of file realpass.cpp.
|
overridevirtual |
Push changes to remote.
RealPass::GitPush pass git push wrapper.
Implements Pass.
Definition at line 53 of file realpass.cpp.
|
overridevirtual |
Initialize password store.
RealPass::Init initialize pass repository.
| path | Store root path. |
| users | GPG recipients. |
| path | Absolute path to new password-store |
| users | list of users with ability to decrypt new password-store |
Implements Pass.
Definition at line 101 of file realpass.cpp.
|
overridevirtual |
Insert new password.
RealPass::Insert pass insert.
| file | Path to password file. |
| newValue | Password content. |
| overwrite | true to overwrite existing. |
Implements Pass.
Definition at line 79 of file realpass.cpp.
|
overridevirtual |
Move password file or directory.
RealPass::Move move a file (or folder).
| src | Source path. |
| dest | Destination path. |
| force | Overwrite existing. |
| src | source file or folder |
| dest | destination file or folder |
| force | overwrite |
Implements Pass.
Definition at line 122 of file realpass.cpp.
|
overridevirtual |
Generate OTP code.
RealPass::OtpGenerate pass otp.
| file | Path to password file with OTP. |
| file | file containing OTP uri |
Implements Pass.
Definition at line 72 of file realpass.cpp.
|
overridevirtual |
Remove password or directory.
RealPass::Remove pass remove wrapper.
| file | Path to remove. |
| isDir | true if removing directory. |
Implements Pass.
Definition at line 91 of file realpass.cpp.
|
overridevirtual |
Show decrypted password.
RealPass::Show pass show.
| file | Path to password file. |
| file | file to decrypt |
Implements Pass.
Definition at line 64 of file realpass.cpp.