Publish Nerbus source snapshot and build documentation
This commit is contained in:
commit
73401987df
17 files changed
+2169
No files matched your search
@@ -0,0 +1,34 @@
|
||||
#pragma once
|
||||
#include <QtCore>
|
||||
#include <array>
|
||||
|
||||
inline const QString NrbGenesis = QStringLiteral("0177ee4010f9617feb8e2956aa4dfb7a8df18b6e4f6cc3359bdb8cfef9d10bfd");
|
||||
void wipe(QByteArray &bytes);
|
||||
[[noreturn]] void walletError(const QString &message);
|
||||
QJsonObject offlineCore(QJsonObject request);
|
||||
|
||||
class WalletStore {
|
||||
QString filename;
|
||||
unsigned char *key = nullptr;
|
||||
bool plainOpen = false;
|
||||
QByteArray salt;
|
||||
QByteArray plaintext;
|
||||
QJsonObject decrypt(const QByteArray &file, QByteArray &password, unsigned char *outKey, QByteArray &outSalt);
|
||||
void save(const QJsonObject &data);
|
||||
public:
|
||||
explicit WalletStore(QString path);
|
||||
~WalletStore();
|
||||
bool exists() const;
|
||||
bool unlocked() const { return key != nullptr || plainOpen; }
|
||||
bool passwordProtected() const { return key != nullptr; }
|
||||
static bool fileRequiresPassword(const QString &path);
|
||||
QString path() const { return filename; }
|
||||
void create(QByteArray password);
|
||||
void unlock(QByteArray password);
|
||||
void changePassword(QByteArray password);
|
||||
void lock();
|
||||
QJsonArray entries() const;
|
||||
QString addKey(const QJsonObject &pair, const QString &label);
|
||||
void backup(const QString &destination) const;
|
||||
void restore(const QString &source, QByteArray password);
|
||||
};
|
||||
Reference in new issue
Block a user