Recommend a stand alone DB? lazarus / 16-Databases ---------------------------------------------------------------------- Fishous · 2011-07-21 11:04 Ok, so I'm not the greatest when it comes to databases, I just never had the need. I do however have one program that uses a database to store website logins, details and notes. Currently in Delphi 6 I use TinyDB. I'm looking at converting that program to FPC, targeting MacOS and Windows. Can anyone recommend which type of database/engine to use for something requiring: + Single user + Local database file + Encrypted (This might be able to be worked around by encrypting the PW before storing in the database) + Preferably no installation required so that the program can run from a USB drive. ---------------------------------------------------------------------- George Athanasiadis · 2011-07-21 11:39 SQLite ---------------------------------------------------------------------- BigChimp · 2011-07-21 11:47 I'd suggest sqlite, too. Don't know whether it supports encryption, but I think it's better handled at the application level anyway. ---------------------------------------------------------------------- felipemdc · 2011-07-21 11:49 You said that you want to encrypt the passwords. That's a bad idea, someone could decrypt it and gain access to the passwords of users. The usual way to store passwords is not to store them at all. Store a hash generated from the password instead and then generate a hash from what the user entered and compare them. Free Pascal comes with some units to do md5 hashing for example. ---------------------------------------------------------------------- JD · 2011-07-21 12:48 In addition to SQLite, you could also consider Firebird embedded database. http://sourceforge.net/projects/firebird/files/firebird- win32/2.5-Release/Firebird-2.5.0.26074-0_Win32_embed.zip/download By the way, SQLite has a version with encryption capabilities. I found it in the wxSQLite zip package http://wxcode.sourceforge.net/components/wxsqlite3/ QuoteDescription: wxSQLite3 is a C++ wrapper around the public domain SQLite 3.x database and is specifically designed for use in programs based on the wxWidgets library. wxSQLite3 does not try to hide the underlying database, in contrary almost all special features of the current SQLite3 version 3.7.7.1 are supported, like for example the creation of user defined scalar or aggregate functions. Since SQLite stores strings in UTF-8 encoding, the wxSQLite3 methods provide automatic conversion between wxStrings and UTF-8 strings. The methods ToUTF8 and FromUTF8 of the wxString class (available since wxWidgets 2.8.4) are used for the conversion. Special care has to be taken if external administration tools are used to modify the database contents, since not all of these tools operate in Unicode or UTF-8 mode. wxSQLite3 includes an optional extension for SQLite supporting key based database file encryption using 128 bit AES encryption. Starting with version 1.9.6 of wxSQLite3 the encryption extension is compatible with the SQLite amalgamation source. Experimental support for 256 bit AES encryption has been added in version 1.9.8. Cheers. ---------------------------------------------------------------------- jacem · 2011-07-25 18:18 Quote from: felipemdc on July 21, 2011, 01:49:28 pmFree Pascal comes with some units to do md5 hashing for example. Which units and are they available from the package manager? Thanks in advance jonathan ---------------------------------------------------------------------- vvzh · 2011-07-25 19:01 Unit name is md5.pp, it comes preinstalled with FPC itself.