TLiteUtils.EncryptDatabase Examples
Posted: Sun 24 Feb 2013 09:09
Where can I find examples on how to use TLiteUtils.EncryptDatabase method? There is no examples in the documentation.
Discussion forums for open issues and questions concerning database tools, data access components and developer tools from Devart
https://forums.devart.com/
Code: Select all
UniConnection1.ProviderName := 'SQLite';
UniConnection1.Database := 'C:\sqlite.db3'; // the name of the database to be encrypted
UniConnection1.SpecificOptions.Values['Direct'] := 'True';
UniConnection1.SpecificOptions.Values['EncryptionAlgorithm'] := 'laBlowfish';// the database will be encrypted with the Blowfish encryption algorithm
UniConnection1.SpecificOptions.Values['EncryptionKey'] := ''; // no encryption key specified, because the database is not encrypted yet
UniConnection1.Open; // connect to the database
TLiteUtils.EncryptDatabase(UniConnection1, '11111'); // encrypt the database using the "11111" encryption keyCode: Select all
UniConnection1.ProviderName := 'SQLite';
UniConnection1.Database : = 'C:\sqlite_encoded.db3'; // the name of the database to connect to
UniConnection1.SpecificOptions.Values['Direct'] := 'True';
UniConnection1.SpecificOptions.Values['EncryptionAlgorithm'] := 'laBlowfish'; // the encryption algorithm of the database
UniConnection1.SpecificOptions.Values['EncryptionKey'] := '11111'; // the encryption key for the database
UniConnection1.Open; // connect to the database
TLiteUtils.EncryptDatabase(UniConnection1, '22222'); // change the database encryption key to '22222'