#1 Today 00:29:14

Sapiem
Member
Registered: 2017-12-08
Posts: 78

What encryption mORMot2 uses in SQLite databases?

Because mORMot2 in Delphi 13 doesn't allow creating Android APKs, I need to access my database using Java/Kotlin from Android Studio. This is the code I'm implementing in Delphi, and it works perfectly. How can I find out what encryption mORMot2 uses in this case, and is it possible to make it available for Android via Java/Kotlin?

procedure TMain.Button1Click(Sender: TObject);
var
  myDb: TSQLDataBase;
  Conn: TSQLDBConnection;
  fProps: TSQLDBConnectionProperties;
  DBName: string;
begin
  DBName:= 'E:\Programacion\MyProgDB.db';
      fProps := TSQLDBSQLite3ConnectionProperties.Create(StringToUTF8(DBName),
        '', '', StringToUTF8('DBpwd123'));
      Conn := fProps.ThreadSafeConnection;
      if not Conn.Connected then
        Conn.Connect; // ensure we can connect to the DB

      if Conn.Connected then
          Memo2.Lines.Add(UTF8ToWideString(fProps.Execute('SELECT count(*) FROM DataTb;', []).FetchAllAsJSON(True)));
end;

Offline

#2 Today 06:30:47

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 15,506
Website

Re: What encryption mORMot2 uses in SQLite databases?

The encryption is proprietary and I think it won't be available in regular SQLite3 wrappers in Java.

The main function is CodecAesProcess().

More information at
https://github.com/synopse/mORMot2/blob … c.pas#L553

Offline

Board footer

Powered by FluxBB