|
wxSQLite3 4.12.5
|
Cipher base class. More...
#include <wxsqlite3.h>
Public Member Functions | |
| wxSQLite3Cipher () | |
| Constructor. | |
| virtual | ~wxSQLite3Cipher () |
| Destructor. | |
| virtual bool | InitializeFromGlobalDefault () |
| Initialize the cipher instance based on global default settings. | |
| virtual bool | InitializeFromCurrent (wxSQLite3Database &db) |
| Initialize the cipher instance based on current settings. | |
| virtual bool | InitializeFromCurrentDefault (wxSQLite3Database &db) |
| Initialize the cipher instance based on current default settings. | |
| virtual bool | Apply (wxSQLite3Database &db) const |
| Apply the cipher parameters to a database connection. | |
| virtual bool | Apply (void *dbHandle) const |
| void | SetLegacyPageSize (int pageSize) |
| int | GetLegacyPageSize () const |
| wxSQLite3CipherType | GetCipherType () const |
| Get the type of this cipher instance. | |
| bool | IsOk () const |
| Check whether the cipher instance is valid. | |
Static Public Member Functions | |
| static const wxString | GetCipherName (wxSQLite3CipherType cipherType) |
| Convert cipher type to string representation. | |
| static wxSQLite3CipherType | GetCipherType (const wxString &cipherName) |
| Convert string representation to cipher type. | |
| static bool | SetCipher (wxSQLite3Database &db, wxSQLite3CipherType cipherType) |
| Set the current cipher type for a database connection. | |
| static bool | SetCipherDefault (wxSQLite3Database &db, wxSQLite3CipherType cipherType) |
| Set the default cipher type for a database connection. | |
| static wxSQLite3CipherType | GetCipher (wxSQLite3Database &db) |
| Get the current cipher type of a database connection. | |
| static wxSQLite3CipherType | GetCipherDefault (wxSQLite3Database &db) |
| Get the default cipher type of a database connection. | |
| static wxSQLite3CipherType | GetGlobalCipherDefault () |
| Get the globally defined default cipher type. | |
| static int | GetCipherParameterMin (const wxString &cipherName, const wxString ¶mName) |
| Get minimum allowed cipher parameter value. | |
| static int | GetCipherParameterMax (const wxString &cipherName, const wxString ¶mName) |
| Get maximum allowed cipher parameter value. | |
Protected Member Functions | |
| wxSQLite3Cipher (wxSQLite3CipherType cipherType) | |
| Constructor. | |
| wxSQLite3Cipher (const wxSQLite3Cipher &cipher) | |
| Copy constructor. | |
| void | SetInitialized (bool initialized) |
| Set initialization status of the cipher instance. | |
| void | SetCipherType (wxSQLite3CipherType cipherType) |
| Set type of the cipher instance. | |
Static Protected Member Functions | |
| static void * | GetDatabaseHandle (wxSQLite3Database &db) |
| Get the SQLite3 database handle of a database instance. | |
Cipher base class.
| wxSQLite3Cipher::wxSQLite3Cipher | ( | ) |
Constructor.
|
virtual |
Destructor.
|
protected |
Constructor.
| cipherType | the type of the cipher |
|
protected |
Copy constructor.
|
virtual |
|
virtual |
Apply the cipher parameters to a database connection.
The parameters of the cipher instance are applied to the given database connection.
| db | database instance representing a database connection |
Reimplemented in wxSQLite3CipherAegis, wxSQLite3CipherAes128, wxSQLite3CipherAes256, wxSQLite3CipherAscon128, wxSQLite3CipherChaCha20, wxSQLite3CipherRC4, and wxSQLite3CipherSQLCipher.
|
static |
Get the current cipher type of a database connection.
| db | database instance |
|
static |
Get the default cipher type of a database connection.
| db | database instance |
|
static |
Convert cipher type to string representation.
The given cipher type is converted to a string representation.
| cipherType | the type of a cipher |
|
static |
Get maximum allowed cipher parameter value.
| cipherName | the name of the cipher to be queried |
| paramName | the name of the parameter to be queried |
|
static |
Get minimum allowed cipher parameter value.
| cipherName | the name of the cipher to be queried |
| paramName | the name of the parameter to be queried |
| wxSQLite3CipherType wxSQLite3Cipher::GetCipherType | ( | ) | const |
Get the type of this cipher instance.
The type of the cipher instance is returned.
|
static |
Convert string representation to cipher type.
The given string representation of a cipher is converted to the corresponding cipher type.. The parameters of the cipher instance are applied to the given database connection. WXSQLITE_CIPHER_UNKNOWN will be returned if the string representation is invalid.
| cipherName | the string representation of a cipher type |
|
staticprotected |
Get the SQLite3 database handle of a database instance.
| db | database instance |
|
static |
Get the globally defined default cipher type.
| int wxSQLite3Cipher::GetLegacyPageSize | ( | ) | const |
|
virtual |
Initialize the cipher instance based on current settings.
The parameters of the cipher instance are initialize with the current settings of the associated cipher type as defined in the given database connection.
| db | database instance representing a database connection |
Reimplemented in wxSQLite3CipherAegis, wxSQLite3CipherAes128, wxSQLite3CipherAes256, wxSQLite3CipherAscon128, wxSQLite3CipherChaCha20, wxSQLite3CipherRC4, and wxSQLite3CipherSQLCipher.
|
virtual |
Initialize the cipher instance based on current default settings.
The parameters of the cipher instance are initialize with the current default settings of the associated cipher type as defined in the given database connection.
| db | database instance representing a database connection |
Reimplemented in wxSQLite3CipherAegis, wxSQLite3CipherAes128, wxSQLite3CipherAes256, wxSQLite3CipherAscon128, wxSQLite3CipherChaCha20, wxSQLite3CipherRC4, and wxSQLite3CipherSQLCipher.
|
virtual |
Initialize the cipher instance based on global default settings.
The parameters of the cipher instance are initialize with the global default settings of the associated cipher type.
Reimplemented in wxSQLite3CipherAegis, wxSQLite3CipherAes128, wxSQLite3CipherAes256, wxSQLite3CipherAscon128, wxSQLite3CipherChaCha20, wxSQLite3CipherRC4, and wxSQLite3CipherSQLCipher.
| bool wxSQLite3Cipher::IsOk | ( | ) | const |
Check whether the cipher instance is valid.
The method checks whether the cipher instance is initialized correctly.
|
static |
Set the current cipher type for a database connection.
| db | database instance |
| cipherType | the cipher type to be set |
|
static |
Set the default cipher type for a database connection.
| db | database instance |
| cipherType | the cipher type to be set |
|
protected |
Set type of the cipher instance.
| cipherType | the cipher type to be set |
|
protected |
Set initialization status of the cipher instance.
| initialized | the initialization status |
| void wxSQLite3Cipher::SetLegacyPageSize | ( | int | pageSize | ) |