aboutsummaryrefslogtreecommitdiffstats
path: root/Plugins/DbSqliteCipher/dbsqlitecipher.h
diff options
context:
space:
mode:
authorLibravatarUnit 193 <unit193@ubuntu.com>2016-06-13 18:42:57 -0400
committerLibravatarUnit 193 <unit193@ubuntu.com>2016-06-13 18:42:57 -0400
commit65d5f68cc6dc81799c5a5d90400a2c1f0dd02547 (patch)
tree6f245ba901b87ef42fed69965aea22f5eea6b590 /Plugins/DbSqliteCipher/dbsqlitecipher.h
parentaeb6bad01630d325a4e768e798a7a6d44e18fdaf (diff)
parent5d9314f134ddd3dc4c853e398ac90ba247fb2e4f (diff)
Merge tag 'upstream/3.1.0'
Upstream version 3.1.0 # gpg: Signature made Mon 13 Jun 2016 06:42:54 PM EDT using RSA key ID EBE9BD91 # gpg: Good signature from "Unit 193 <unit193@gmail.com>" # gpg: aka "Unit 193 <unit193@ninthfloor.org>" # gpg: aka "Unit 193 <unit193@ubuntu.com>" # gpg: aka "Unit 193 <unit193@ninthfloor.com>"
Diffstat (limited to 'Plugins/DbSqliteCipher/dbsqlitecipher.h')
-rw-r--r--Plugins/DbSqliteCipher/dbsqlitecipher.h40
1 files changed, 40 insertions, 0 deletions
diff --git a/Plugins/DbSqliteCipher/dbsqlitecipher.h b/Plugins/DbSqliteCipher/dbsqlitecipher.h
new file mode 100644
index 0000000..ef2ffea
--- /dev/null
+++ b/Plugins/DbSqliteCipher/dbsqlitecipher.h
@@ -0,0 +1,40 @@
+#ifndef DBSQLITECIPHER_H
+#define DBSQLITECIPHER_H
+
+#include "dbsqlitecipher_global.h"
+#include "plugins/dbplugin.h"
+#include "plugins/genericplugin.h"
+
+class DBSQLITECIPHERSHARED_EXPORT DbSqliteCipher : public GenericPlugin, public DbPlugin
+{
+ Q_OBJECT
+ SQLITESTUDIO_PLUGIN("dbsqlitecipher.json")
+
+ public:
+ DbSqliteCipher();
+
+ QString getLabel() const;
+ bool checkIfDbServedByPlugin(Db* db) const;
+ Db* getInstance(const QString& name, const QString& path, const QHash<QString, QVariant>& options, QString* errorMessage);
+ QList<DbPluginOption> getOptionsList() const;
+ QString generateDbName(const QVariant& baseValue);
+ bool init();
+ void deinit();
+
+ static_char* PASSWORD_OPT = "password";
+ static_char* CIPHER_OPT = "cipher";
+ static_char* KDF_ITER_OPT = "kdf_iter";
+ static_char* CIPHER_PAGE_SIZE_OPT = "cipher_page_size";
+ static_char* CIPHER_1_1_OPT = "cipher_1.1_compatibility";
+ static const int DEF_CIPHER_PAGE_SIZE = 1024;
+ static const int DEF_KDF_ITER = 64000;
+ static_char* DEF_CIPHER = "aes-256-cbc";
+
+ private:
+ bool initValid = false;
+
+ static_char* LICENSE_TITLE = "SQLCipher (BSD) in DbSqliteCipher plugin";
+ static_char* OPENSSL_TITLE = "OpenSSL (used by DbSqliteCipher plugin) license";
+};
+
+#endif // DBSQLITECIPHER_H