資源簡介
這個是qt調用sqlite3加密的源碼,親測可用,我的編譯環境是qt5.9.0。

代碼片段和文件信息
/****************************************************************************
**
**?Copyright?(C)?2016?The?Qt?Company?Ltd.
**?Contact:?https://www.qt.io/licensing/
**
**?This?file?is?part?of?the?QtSql?module?of?the?Qt?Toolkit.
**
**?$QT_BEGIN_LICENSE:LGPL$
**?Commercial?License?Usage
**?Licensees?holding?valid?commercial?Qt?licenses?may?use?this?file?in
**?accordance?with?the?commercial?license?agreement?provided?with?the
**?Software?or?alternatively?in?accordance?with?the?terms?contained?in
**?a?written?agreement?between?you?and?The?Qt?Company.?For?licensing?terms
**?and?conditions?see?https://www.qt.io/terms-conditions.?For?further
**?information?use?the?contact?form?at?https://www.qt.io/contact-us.
**
**?GNU?Lesser?General?Public?License?Usage
**?Alternatively?this?file?may?be?used?under?the?terms?of?the?GNU?Lesser
**?General?Public?License?version?3?as?published?by?the?Free?Software
**?Foundation?and?appearing?in?the?file?LICENSE.LGPL3?included?in?the
**?packaging?of?this?file.?Please?review?the?following?information?to
**?ensure?the?GNU?Lesser?General?Public?License?version?3?requirements
**?will?be?met:?https://www.gnu.org/licenses/lgpl-3.0.html.
**
**?GNU?General?Public?License?Usage
**?Alternatively?this?file?may?be?used?under?the?terms?of?the?GNU
**?General?Public?License?version?2.0?or?(at?your?option)?the?GNU?General
**?Public?license?version?3?or?any?later?version?approved?by?the?KDE?Free
**?Qt?Foundation.?The?licenses?are?as?published?by?the?Free?Software
**?Foundation?and?appearing?in?the?file?LICENSE.GPL2?and?LICENSE.GPL3
**?included?in?the?packaging?of?this?file.?Please?review?the?following
**?information?to?ensure?the?GNU?General?Public?License?requirements?will
**?be?met:?https://www.gnu.org/licenses/gpl-2.0.html?and
**?https://www.gnu.org/licenses/gpl-3.0.html.
**
**?$QT_END_LICENSE$
**
****************************************************************************/
#include?
#include????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????
#include?“sqlitecipher_p.h“
QT_BEGIN_NAMESPACE
/*
?*?Change?the?driver?name?if?you?like.
?*/
static?const?char?DriverName[]?=?“SQLITECIPHER“;
class?SqliteCipherDriverPlugin?:?public?QSqlDriverPlugin
{
#if?(QT_VERSION?>=?0x050000)
????Q_object
????Q_PLUGIN_metaDATA(IID?“org.qt-project.Qt.QSqlDriverFactoryInterface“?FILE?“SqliteCipherDriverPlugin.json“)
#endif
public:
????SqliteCipherDriverPlugin();
?
????QSqlDriver*?create(const?QString?&);
#if?(QT_VERSION?0x050000)
????QStringList?keys()?const;
#endif
};
SqliteCipherDriverPlugin::SqliteCipherDriverPlugin()
????:?QSqlDriverPlugin()
{
}
QSqlDriver*?SqliteCipherDriverPlugin::create(const?QString?&name)
{
????if?(name?==?QLatin1String(DriverName))?{
????????SQLiteCipherDriver*?driver?=?new?SQLiteCipherDriver();
????????return?driver;
????}
????return?0;
}
#if?(QT_VERSION?0x050000)
QStringList?SqliteCipherDriverPlugin::keys()?const
{
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????文件???????3256??2017-04-08?06:47??sqlitecipher\smain.cpp
?????文件???????7645??2017-04-08?06:47??sqlitecipher\sqlcachedresult.cpp
?????文件???????3181??2017-04-08?06:47??sqlitecipher\sqlcachedresult_p.h
?????文件??????20424??2017-04-08?06:47??sqlitecipher\sqlite3\codec.c
?????文件???????3171??2017-04-08?06:47??sqlitecipher\sqlite3\codec.h
?????文件??????11429??2017-04-08?06:47??sqlitecipher\sqlite3\codecext.c
?????文件??????26289??2017-04-08?06:47??sqlitecipher\sqlite3\csv.c
?????文件??????52952??2017-04-08?06:47??sqlitecipher\sqlite3\extensionfunctions.c
?????文件?????100718??2017-04-08?06:47??sqlitecipher\sqlite3\rijndael.c
?????文件???????6556??2017-04-08?06:47??sqlitecipher\sqlite3\rijndael.h
?????文件??????33153??2017-04-08?06:47??sqlitecipher\sqlite3\sha2.c
?????文件???????5412??2017-04-08?06:47??sqlitecipher\sqlite3\sha2.h
?????文件??????20650??2017-04-08?06:47??sqlitecipher\sqlite3\shathree.c
?????文件?????194568??2017-04-08?06:47??sqlitecipher\sqlite3\shell.c
?????文件????7077089??2017-04-08?06:47??sqlitecipher\sqlite3\sqlite3.c
?????文件???????5104??2017-04-08?06:47??sqlitecipher\sqlite3\sqlite3.def
?????文件?????496403??2017-04-08?06:47??sqlitecipher\sqlite3\sqlite3.h
?????文件????????614??2017-04-08?06:47??sqlitecipher\sqlite3\sqlite3.pri
?????文件????????794??2017-04-08?06:47??sqlitecipher\sqlite3\sqlite3.rc
?????文件??????30004??2017-04-08?06:47??sqlitecipher\sqlite3\sqlite3ext.h
?????文件???????3479??2017-04-08?06:47??sqlitecipher\sqlite3\sqlite3secure.c
?????文件????????802??2017-04-08?06:47??sqlitecipher\sqlite3\sqlite3shell.rc
?????文件???????3485??2017-04-08?06:47??sqlitecipher\sqlite3\sqlite3userauth.h
?????文件??????11808??2017-04-08?06:47??sqlitecipher\sqlite3\userauth.c
?????文件???????2118??2017-04-08?06:47??sqlitecipher\sqlitechipher_global.h
?????文件??????27805??2017-04-08?06:47??sqlitecipher\sqlitecipher.cpp
?????文件???????1219??2018-06-06?08:31??sqlitecipher\sqlitecipher.pro
?????文件??????38828??2018-06-06?08:34??sqlitecipher\sqlitecipher.pro.user
?????文件?????????35??2017-04-08?06:47??sqlitecipher\SqliteCipherDriverPlugin.json
?????文件???????2118??2017-04-08?06:47??sqlitecipher\sqlitecipher_global.h
............此處省略12個文件信息
- 上一篇:第一版KTV.rar
- 下一篇:MySQL5.1官方中文參考手冊
評論
共有 條評論