When trying to encrypt my db with the system Sqlchiper me the following error:
net.sqlcipher.database.SQLiteException: file is encrypted or is not a database
net.sqlcipher.database.SQLiteException: file is encrypted or is not a database
B4X:
ProgressDialogShow("Iniciando base de datos, Espere...")
If File.Exists(File.DirDefaultExternal, "encrypt.db") = False Then
File.Copy(File.DirAssets, "encrypt.db", File.DirDefaultExternal, "encrypt.db")
File.Copy(File.DirAssets, "sqlcipher_native.zip", File.DirDefaultExternal, "sqlcipher_native.zip")
End If
If FirstTime Then
'xSQL.Initialize(File.DirDefaultExternal, "bustagenadb.db", True)
Dim ruta As String
ruta = File.DirDefaultExternal
ToastMessageShow(ruta,True)
xSql.Initialize(File.DirDefaultExternal, "encrypt.db", True, "enc", File.DirDefaultExternal)
End If
ProgressDialogHide
xCursor = xSql.ExecQuery("SELECT user FROM users")
For I = 0 To xCursor.RowCount - 1
DoEvents
xCursor.Position = I
ElementoList.Add(xCursor.GetString("user"))
Next