Collection Contents Previous Next PDF

UltraLite ActiveX User's Guide

Understanding UltraLite ActiveX Development

Encryption and obfuscation


You can encrypt or obfuscate your UltraLite database using UltraLite ActiveX.

Encryption 

To create a database with encryption, set the ULConnectionParms.EncryptionKey property. When you call CreateDatabaseWithParms and pass in the ConnectionParms object, the database created and encrypted with the specified key.

For more information about the EncryptionKey property, see Encryption Key connection parameter and ChangeEncryptionKey method.

Example 

You can change the encryption key by specifying the new encryption key on the Connection object. In this example, "apricot" is the encryption key.

Connection.ChangeEncryptionKey("apricot")

After the database is encrypted, connections to the database must specify the correct encryption key. Otherwise, the connection fails.

Obfuscation 

To obfuscate the database, specify obfuscate=1 as a creation parameter.

For more information about database encryption, see Encrypting UltraLite databases.

Example 

The following code obfuscates a new database.

' eMbedded Visual Basic
open_parms = "ce_file=\tutorial.udb;ce_schema=\tutorial.usm;obfuscate=1"
Set Connection = DatabaseMgr.CreateDatabase( open_parms )
// JScript
open_parms = "ce_file=\\tutorial.udb;ce_schema=\\tutorial.usm;obfuscate=1";
Connection = DatabaseMgr.CreateDatabase( open_parms );

Collection Contents Previous Next PDF