Collection Contents 上一页 下一页 PDF

UltraLite for M-Business Anywhere User's Guide

Understanding UltraLite for M-Business Anywhere Development

Encryption and obfuscation


You can encrypt or obfuscate your UltraLite database using UltraLite for M-Business Anywhere.

For more information about database encryption, see 加密 UltraLite 数据库.

Encryption 

To create a database with encryption, set the ConnectionParms.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 连接参数 and Method changeEncryptionKey.

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.

conn.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 in the ConnectionParms.additionalParms string. For example:

var open_parms = dbMgr.createConnectionParms();
open_parms.additionalParms = "obfuscate=1";
Connection = dbMgr.createDatabase( open_parms );

For more information, see Properties.


Collection Contents 上一页 下一页 PDF