QtPass 1.4.0
Multi-platform GUI for pass, the standard unix password manager.
Loading...
Searching...
No Matches
Classes | Signals | Public Member Functions | Protected Member Functions | List of all members
ImitatePass Class Reference

Imitates pass features when pass is not enabled or available. More...

#include <imitatepass.h>

+ Inheritance diagram for ImitatePass:
+ Collaboration diagram for ImitatePass:

Signals

void startReencryptPath ()
 
void endReencryptPath ()
 
- Signals inherited from Pass
void error (QProcess::ProcessError)
 
void startingExecuteWrapper ()
 
void statusMsg (QString, int)
 
void critical (QString, QString)
 
void processErrorExit (int exitCode, const QString &err)
 
void finishedAny (const QString &, const QString &)
 
void finishedGitInit (const QString &, const QString &)
 
void finishedGitPull (const QString &, const QString &)
 
void finishedGitPush (const QString &, const QString &)
 
void finishedShow (const QString &)
 
void finishedOtpGenerate (const QString &)
 
void finishedInsert (const QString &, const QString &)
 
void finishedRemove (const QString &, const QString &)
 
void finishedInit (const QString &, const QString &)
 
void finishedMove (const QString &, const QString &)
 
void finishedCopy (const QString &, const QString &)
 
void finishedGenerate (const QString &, const QString &)
 
void finishedGenerateGPGKeys (const QString &, const QString &)
 

Public Member Functions

 ImitatePass ()
 ImitatePass::ImitatePass for situaions when pass is not available we imitate the behavior of pass https://www.passwordstore.org/.
 
virtual ~ImitatePass ()
 
virtual void GitInit () Q_DECL_OVERRIDE
 ImitatePass::GitInit git init wrapper.
 
virtual void GitPull () Q_DECL_OVERRIDE
 ImitatePass::GitPull git init wrapper.
 
virtual void GitPull_b () Q_DECL_OVERRIDE
 ImitatePass::GitPull_b git pull wrapper.
 
virtual void GitPush () Q_DECL_OVERRIDE
 ImitatePass::GitPush git init wrapper.
 
virtual void Show (QString file) Q_DECL_OVERRIDE
 ImitatePass::Show shows content of file.
 
virtual void OtpGenerate (QString file) Q_DECL_OVERRIDE
 ImitatePass::OtpGenerate generates an otp code.
 
virtual void Insert (QString file, QString newValue, bool overwrite=false) Q_DECL_OVERRIDE
 ImitatePass::Insert create new file with encrypted content.
 
virtual void Remove (QString file, bool isDir=false) Q_DECL_OVERRIDE
 ImitatePass::Remove custom implementation of "pass remove".
 
virtual void Init (QString path, const QList< UserInfo > &users) Q_DECL_OVERRIDE
 ImitatePass::Init initialize pass repository.
 
void reencryptPath (const QString &dir)
 ImitatePass::reencryptPath reencrypt all files under the chosen directory.
 
void Move (const QString src, const QString dest, const bool force=false) Q_DECL_OVERRIDE
 
void Copy (const QString src, const QString dest, const bool force=false) Q_DECL_OVERRIDE
 
- Public Member Functions inherited from Pass
 Pass ()
 Pass::Pass wrapper for using either pass or the pass imitation.
 
void init ()
 
virtual ~Pass ()
 
virtual void GitInit ()=0
 
virtual void GitPull ()=0
 
virtual void GitPull_b ()=0
 
virtual void GitPush ()=0
 
virtual void Show (QString file)=0
 
virtual void OtpGenerate (QString file)=0
 
virtual void Insert (QString file, QString value, bool force)=0
 
virtual void Remove (QString file, bool isDir)=0
 
virtual void Move (const QString srcDir, const QString dest, const bool force=false)=0
 
virtual void Copy (const QString srcDir, const QString dest, const bool force=false)=0
 
virtual void Init (QString path, const QList< UserInfo > &users)=0
 
virtual QString Generate_b (unsigned int length, const QString &charset)
 Pass::Generate use either pwgen or internal password generator.
 
void GenerateGPGKeys (QString batch)
 Pass::GenerateGPGKeys internal gpg keypair generator . .
 
QList< UserInfolistKeys (QStringList keystrings, bool secret=false)
 Pass::listKeys list users.
 
QList< UserInfolistKeys (QString keystring="", bool secret=false)
 Pass::listKeys list users.
 
void updateEnv ()
 Pass::updateEnv update the execution environment (used when switching profiles)
 

Protected Member Functions

virtual void finished (int id, int exitCode, const QString &out, const QString &err) Q_DECL_OVERRIDE
 ImitatePass::finished this function is overloaded to ensure identical behaviour to RealPass ie. only PASS_* processes are visible inside Pass::finish, so that interface-wise it all looks the same.
 
virtual void executeWrapper (PROCESS id, const QString &app, const QStringList &args, QString input, bool readStdout=true, bool readStderr=true) Q_DECL_OVERRIDE
 executeWrapper overrided so that every execution is a transaction
 
- Protected Member Functions inherited from Pass
void executeWrapper (PROCESS id, const QString &app, const QStringList &args, bool readStdout=true, bool readStderr=true)
 
QString generateRandomPassword (const QString &charset, unsigned int length)
 
quint32 boundedRandom (quint32 bound)
 
virtual void executeWrapper (PROCESS id, const QString &app, const QStringList &args, QString input, bool readStdout=true, bool readStderr=true)
 

Additional Inherited Members

- Static Public Member Functions inherited from Pass
static QString getGpgIdPath (QString for_file)
 Pass::getGpgIdPath return gpgid file path for some file (folder).
 
static QStringList getRecipientList (QString for_file)
 Pass::getRecipientList return list of gpg-id's to encrypt for.
 
static QStringList getRecipientString (QString for_file, QString separator=" ", int *count=NULL)
 Pass::getRecipientString formated string for use with GPG.
 
- Protected Types inherited from Pass
typedef Enums::PROCESS PROCESS
 
- Protected Slots inherited from Pass
virtual void finished (int id, int exitCode, const QString &out, const QString &err)
 Pass::processFinished reemits specific signal based on what process has finished.
 
- Protected Attributes inherited from Pass
Executor exec
 

Detailed Description

Imitates pass features when pass is not enabled or available.

Definition at line 11 of file imitatepass.h.

Constructor & Destructor Documentation

◆ ImitatePass()

ImitatePass::ImitatePass ( )
default

ImitatePass::ImitatePass for situaions when pass is not available we imitate the behavior of pass https://www.passwordstore.org/.

◆ ~ImitatePass()

virtual ImitatePass::~ImitatePass ( )
inlinevirtual

Definition at line 49 of file imitatepass.h.

Member Function Documentation

◆ Copy()

void ImitatePass::Copy ( const QString  src,
const QString  dest,
const bool  force = false 
)
virtual

Implements Pass.

Definition at line 524 of file imitatepass.cpp.

+ Here is the call graph for this function:

◆ endReencryptPath

void ImitatePass::endReencryptPath ( )
signal
+ Here is the caller graph for this function:

◆ executeWrapper()

void ImitatePass::executeWrapper ( PROCESS  id,
const QString &  app,
const QStringList &  args,
QString  input,
bool  readStdout = true,
bool  readStderr = true 
)
protectedvirtual

executeWrapper overrided so that every execution is a transaction

Parameters
id
app
args
input
readStdout
readStderr

Reimplemented from Pass.

Definition at line 623 of file imitatepass.cpp.

+ Here is the call graph for this function:

◆ finished()

void ImitatePass::finished ( int  id,
int  exitCode,
const QString &  out,
const QString &  err 
)
protectedvirtual

ImitatePass::finished this function is overloaded to ensure identical behaviour to RealPass ie. only PASS_* processes are visible inside Pass::finish, so that interface-wise it all looks the same.

Parameters
id
exitCode
out
err

Reimplemented from Pass.

Definition at line 585 of file imitatepass.cpp.

+ Here is the call graph for this function:

◆ GitInit()

void ImitatePass::GitInit ( )
virtual

ImitatePass::GitInit git init wrapper.

Implements Pass.

Definition at line 37 of file imitatepass.cpp.

+ Here is the call graph for this function:

◆ GitPull()

void ImitatePass::GitPull ( )
virtual

ImitatePass::GitPull git init wrapper.

Implements Pass.

Definition at line 44 of file imitatepass.cpp.

◆ GitPull_b()

void ImitatePass::GitPull_b ( )
virtual

ImitatePass::GitPull_b git pull wrapper.

Implements Pass.

Definition at line 49 of file imitatepass.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ GitPush()

void ImitatePass::GitPush ( )
virtual

ImitatePass::GitPush git init wrapper.

Implements Pass.

Definition at line 56 of file imitatepass.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ Init()

void ImitatePass::Init ( QString  path,
const QList< UserInfo > &  users 
)
virtual

ImitatePass::Init initialize pass repository.

Parameters
pathpath in which new password-store will be created
userslist of users who shall be able to decrypt passwords in path

Implements Pass.

Definition at line 171 of file imitatepass.cpp.

+ Here is the call graph for this function:

◆ Insert()

void ImitatePass::Insert ( QString  file,
QString  newValue,
bool  overwrite = false 
)
virtual

ImitatePass::Insert create new file with encrypted content.

Parameters
filefile to be created
newValuevalue to be stored in file
overwritewhether to overwrite existing file

Implements Pass.

Definition at line 91 of file imitatepass.cpp.

+ Here is the call graph for this function:

◆ Move()

void ImitatePass::Move ( const QString  src,
const QString  dest,
const bool  force = false 
)
virtual

Implements Pass.

Definition at line 449 of file imitatepass.cpp.

+ Here is the call graph for this function:

◆ OtpGenerate()

void ImitatePass::OtpGenerate ( QString  file)
virtual

ImitatePass::OtpGenerate generates an otp code.

Implements Pass.

Definition at line 75 of file imitatepass.cpp.

◆ reencryptPath()

void ImitatePass::reencryptPath ( const QString &  dir)

ImitatePass::reencryptPath reencrypt all files under the chosen directory.

This is stil quite experimental..

Parameters
dir

Definition at line 334 of file imitatepass.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ Remove()

void ImitatePass::Remove ( QString  file,
bool  isDir = false 
)
virtual

ImitatePass::Remove custom implementation of "pass remove".

Implements Pass.

Definition at line 145 of file imitatepass.cpp.

+ Here is the call graph for this function:

◆ Show()

void ImitatePass::Show ( QString  file)
virtual

ImitatePass::Show shows content of file.

Implements Pass.

Definition at line 65 of file imitatepass.cpp.

+ Here is the call graph for this function:

◆ startReencryptPath

void ImitatePass::startReencryptPath ( )
signal
+ Here is the caller graph for this function:

The documentation for this class was generated from the following files: