8#ifndef _KWALLETBACKEND_H
9#define _KWALLETBACKEND_H
11#include "backendpersisthandler.h"
12#include "kwalletbackend_export.h"
13#include "kwalletentry.h"
19#include <gpgme++/key.h>
22#define PBKDF2_SHA512_KEYSIZE 56
23#define PBKDF2_SHA512_SALTSIZE 56
24#define PBKDF2_SHA512_ITERATIONS 50000
61 if (i < 16 && x < y) {
70class KWALLETBACKEND_EXPORT Backend
73 explicit Backend(
const QString &name = QStringLiteral(
"kdewallet"),
bool isPath =
false);
79 int open(
const QByteArray &password, WId w = 0);
81 int open(
const GpgME::Key &key);
87 int openPreHashed(
const QByteArray &passwordHash);
91 int close(
bool save =
false);
100 const QString &walletName()
const;
103 int renameWallet(
const QString &newName,
bool isPath =
false);
109 bool createFolder(
const QString &f);
112 void setFolder(
const QString &f)
124 bool hasFolder(
const QString &f)
const
130 Entry *readEntry(
const QString &key);
132#if KWALLET_BUILD_DEPRECATED_SINCE(5, 72)
144 void writeEntry(Entry *e);
147 bool hasEntry(
const QString &key)
const;
150 bool removeEntry(
const QString &key);
153 bool removeFolder(
const QString &f);
177 static bool exists(
const QString &wallet);
179 bool folderDoesNotExist(
const QString &folder)
const;
181 bool entryDoesNotExist(
const QString &folder,
const QString &entry)
const;
183 static QString openRCToString(
int rc);
185 void setCipherType(BackendCipherType ct);
186 BackendCipherType cipherType()
const
191 const GpgME::Key &gpgKey()
const;
194 static QString getSaveLocation();
199 Q_DISABLE_COPY(Backend)
200 class BackendPrivate;
201 BackendPrivate *
const d;
205 bool _useNewHash =
false;
216 BackendCipherType _cipherType;
221 friend class BlowfishPersistHandler;
222 friend class GpgPersistHandler;
226 int openInternal(WId w = 0);
227 int closeInternal(
bool save);
228 void swapToNewHash();
char at(qsizetype i) const const
bool contains(QChar ch, Qt::CaseSensitivity cs) const const
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Nov 22 2024 12:02:51 by
doxygen 1.12.0 written
by
Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.