SWMMVis  6.0.0-alpha.4
Qt6/C++ GIS-based graphical user interface for the SWMMVis engine (6.0.0-alpha.4)
Loading...
Searching...
No Matches
basemapcrypto.h
Go to the documentation of this file.
1
20#ifndef BASEMAPCRYPTO_H
21#define BASEMAPCRYPTO_H
22
23#include <QByteArray>
24#include <QString>
25
31{
32public:
33 BasemapCrypto() = delete;
34
39 static QByteArray encrypt(const QString &plaintext);
40
46 static QString decrypt(const QByteArray &cipherBase64);
47
48private:
49 static QByteArray machinePassphrase();
50 static bool deriveKey(const QByteArray &passphrase,
51 const QByteArray &salt,
52 QByteArray &key,
53 QByteArray &iv);
54};
55
56#endif // BASEMAPCRYPTO_H
Static helper for AES-256-CBC encrypt/decrypt of short strings.
Definition basemapcrypto.h:31
static QByteArray encrypt(const QString &plaintext)
Encrypts plaintext using a machine-derived passphrase.
Definition basemapcrypto.cpp:66
BasemapCrypto()=delete
static QString decrypt(const QByteArray &cipherBase64)
Decrypts cipherBase64 using a machine-derived passphrase.
Definition basemapcrypto.cpp:111
const char * key
Definition meshcellparams.cpp:24