@@ -38,7 +38,8 @@ enum wxSQLite3CipherType
38
38
WXSQLITE_CIPHER_AES256,
39
39
WXSQLITE_CIPHER_CHACHA20,
40
40
WXSQLITE_CIPHER_SQLCIPHER,
41
- WXSQLITE_CIPHER_RC4
41
+ WXSQLITE_CIPHER_RC4,
42
+ WXSQLITE_CIPHER_ASCON128
42
43
};
43
44
44
45
#define WXSQLITE_ERROR 1000
@@ -133,6 +134,7 @@ enum wxSQLite3StatementStatus
133
134
#define WXSQLITE_DIRECTONLY 0x000080000
134
135
#define WXSQLITE_SUBTYPE 0x000100000
135
136
#define WXSQLITE_INNOCUOUS 0x000200000
137
+ #define WXSQLITE_RESULT_SUBTYPE 0x001000000
136
138
137
139
inline void operator ++(wxSQLite3LimitType& value)
138
140
{
@@ -1221,6 +1223,73 @@ class WXDLLIMPEXP_SQLITE3 wxSQLite3CipherRC4 : public wxSQLite3Cipher
1221
1223
bool m_legacy; // /< Flag for legacy mode
1222
1224
};
1223
1225
1226
+ // / Cipher class representing Ascon-128 encryption with Ascon tag
1227
+ class WXDLLIMPEXP_SQLITE3 wxSQLite3CipherAscon128 : public wxSQLite3Cipher
1228
+ {
1229
+ public:
1230
+ // / Constructor
1231
+ wxSQLite3CipherAscon128 ();
1232
+
1233
+ // / Copy constructor
1234
+ wxSQLite3CipherAscon128 (const wxSQLite3CipherAscon128& cipher);
1235
+
1236
+ // / Destructor
1237
+ virtual ~wxSQLite3CipherAscon128 ();
1238
+
1239
+ // / Initialize the cipher instance based on global default settings
1240
+ /* *
1241
+ * The parameters of the cipher instance are initialize with the global default settings of the associated cipher type.
1242
+ * \return true if the cipher instance could be initialized successfully, false otherwise
1243
+ */
1244
+ virtual bool InitializeFromGlobalDefault ();
1245
+
1246
+ // / Initialize the cipher instance based on current settings
1247
+ /* *
1248
+ * The parameters of the cipher instance are initialize with the current settings of the associated cipher type
1249
+ * as defined in the given database connection.
1250
+ * \param db database instance representing a database connection
1251
+ * \return true if the cipher instance could be initialized successfully, false otherwise
1252
+ */
1253
+ virtual bool InitializeFromCurrent (wxSQLite3Database& db);
1254
+
1255
+ // / Initialize the cipher instance based on current default settings
1256
+ /* *
1257
+ * The parameters of the cipher instance are initialize with the current default settings of the associated cipher type
1258
+ * as defined in the given database connection.
1259
+ * \param db database instance representing a database connection
1260
+ * \return true if the cipher instance could be initialized successfully, false otherwise
1261
+ */
1262
+ virtual bool InitializeFromCurrentDefault (wxSQLite3Database& db);
1263
+
1264
+ // / Apply the cipher parameters to a database connection
1265
+ /* *
1266
+ * The parameters of the cipher instance are applied to the given database connection.
1267
+ * \param db database instance representing a database connection
1268
+ * \return true if the cipher parameters could be applied successfully, false otherwise
1269
+ */
1270
+ virtual bool Apply (wxSQLite3Database& db) const ;
1271
+ virtual bool Apply (void * dbHandle) const ;
1272
+
1273
+ #if 0
1274
+ // Currently no legacy mode available
1275
+ /// Set legacy mode
1276
+ void SetLegacy(bool legacy) { m_legacy = legacy; }
1277
+
1278
+ /// Get legacy mode
1279
+ bool GetLegacy() const { return m_legacy; }
1280
+ #endif
1281
+
1282
+ // / Set iteration count of KDF function for ordinary key
1283
+ void SetKdfIter (int kdfIter) { m_kdfIter = kdfIter; }
1284
+
1285
+ // / Get iteration count of KDF function for ordinary key
1286
+ int GetKdfIter () const { return m_kdfIter; }
1287
+
1288
+ private:
1289
+ bool m_legacy; // /< Flag for legacy mode
1290
+ int m_kdfIter; // /< Iteration count for KDF function
1291
+ };
1292
+
1224
1293
1225
1294
// / Interface for a user defined hook function
1226
1295
/* *
0 commit comments