Page Menu
Home
GnuPG
Search
Configure Global Search
Log In
Files
F36623034
pass.h
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Size
1 KB
Subscribers
None
pass.h
View Options
/*
SPDX-FileCopyrightText: 2014-2023 Anne Jan Brouwer <brouwer@annejan.com>
SPDX-FileCopyrightText: 2017 Jason A. Donenfeld <Jason@zx2c4.com>
SPDX-FileCopyrightText: 2020 Charlie Waters <cawiii@me.com>
SPDX-FileCopyrightText: 2023 g10 Code GmbH
SPDX-FileContributor: Sune Stolborg Vuorela <sune@vuorela.dk>
SPDX-License-Identifier: GPL-3.0-or-later
*/
#ifndef PASS_H
#define PASS_H
#include
"userinfo.h"
#include
<QGpgME/Protocol>
#include
<QQueue>
#include
<QString>
#include
<cassert>
#include
<map>
/*!
\class Pass
\brief Acts as an abstraction for pass or pass imitation
*/
class
Pass
final
:
public
QObject
{
Q_OBJECT
public
:
Pass
();
void
Show
(
const
QString
&
file
);
void
Insert
(
const
QString
&
file
,
const
QString
&
value
);
void
Remove
(
const
QString
&
file
,
bool
isDir
);
void
Move
(
const
QString
&
srcDir
,
const
QString
&
dest
,
const
bool
force
=
false
);
void
Copy
(
const
QString
&
srcDir
,
const
QString
&
dest
,
const
bool
force
=
false
);
void
Init
(
const
QString
&
path
,
const
QList
<
UserInfo
>
&
users
);
QString
Generate_b
(
unsigned
int
length
,
const
QString
&
charset
);
QList
<
UserInfo
>
listKeys
(
const
QStringList
&
keystrings
,
bool
secret
=
false
);
QList
<
UserInfo
>
listKeys
(
const
QString
&
keystring
=
QString
{},
bool
secret
=
false
);
static
QStringList
getRecipientList
(
const
QString
&
for_file
);
private
:
QGpgME
::
Protocol
*
protocol
=
QGpgME
::
openpgp
();
QString
generateRandomPassword
(
const
QString
&
charset
,
unsigned
int
length
);
quint32
boundedRandom
(
quint32
bound
);
void
reencryptPath
(
const
QString
&
dir
);
Q_SIGNALS
:
void
startReencryptPath
();
void
endReencryptPath
();
void
errorString
(
const
QString
&
err
);
void
statusMsg
(
const
QString
&
,
int
);
void
critical
(
const
QString
&
,
const
QString
&
);
void
processErrorExit
(
int
exitCode
,
const
QString
&
err
);
void
finishedShow
(
const
QString
&
plainTextPassword
);
void
finishedInsert
();
};
#endif
// PASS_H
File Metadata
Details
Attached
Mime Type
text/x-c++
Expires
Thu, Feb 26, 6:36 PM (10 h, 51 m)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
48/b9/2c368e94fd4e38ecc208ecc4fd55
Attached To
rGPGPASS GnuPG Password Manager
Event Timeline
Log In to Comment