Dim SQL As SQLCipher
SQL.Initialize(cAppSettings.Dir_Data, "sdata.db", True, cAppSettings.DBPW, "")
SQL.ExecQuery ("PRAGMA cipher_migrate")
'This works fine for accessing the encrypted DB.
'<Test>
SQL.ExecQuery("PRAGMA key = " & cAppSettings.DBPW)
Dim plaintextDbPath As String = cAppSettings.Dir_Data & "/plaintext.db"
Dim nextSQLStatement As String = "ATTACH DATABASE '" & plaintextDbPath & "' AS plaintext KEY ''"
' nextSQLStatement: [ATTACH DATABASE '/storage/emulated/0/<AppName>/Data/plaintext.db' AS plaintext KEY '']
SQL.ExecQuery(nextSQLStatement)
SQL.ExecQuery("SELECT sqlcipher_export('plaintext')")
SQL.ExecQuery("DETACH DATABASE plaintext")
'</Test>