You can enable encryption using the below two APIs:
You can access sync.init in two ways:
sync.init(syncInitSuccesscallback, syncInitErrorcallback);
Note: Encryption is disabled, by default.
var config={}; config.oninitsuccess = syncInitSuccesscallback; config.oniniterror = syncInitErrorcallback; config.devicedbencryptionkey = “KonySync”; sync.init(config);
Note: The database is encrypted using devicedbencryptionkey.
If config.devicedbencryptionkey=null/undefined/<Empty String>, then encryption is disabled.
You can access sync.reset in two ways:
sync.reset(syncResetSuccesscallback, syncResetErrorcallback);
Note: Encryption is disabled, by default.
var config={}; config.onresetsuccess = syncResetSuccesscallback; config.onreseterror = syncResetErrorcallback; config.devicedbencryptionkey = “KonySync”; sync.reset(config);
Note: The database is encrypted using devicedbencryptionkey.
If config.devicedbencryptionkey=null/undefined/<Empty String>, then encryption is disabled.
Note: To encrypt SQLite database for iPad/iPhone devices, follow these steps:
KAR
file with "-sqlcipher" option3KAR
file using "-sqlcipher" option.Note: For Android Devices:
For Android mobile devices:
Application Resource
folder from IDE and create the folder structure resources/customlibs/lib/android
, if already does not exist.libs
folder of SQLCipher into resources/customlibs/lib/android
, if does not exist already. The SQLCipher libs
folder contains the two folders (armeabi
, x86
) and three jar files. You need to copy all the files to android
.konysqlcipher.jar
into the same android folder. You can obtain the latest jar file from the Android build folder [Ctrl + Alt + T] (jar location: workspace\temp\<Application>\build\luaandroid\extres
).resources\mobile\native\android\assets
(for Android mobile device, if does not exist already) and copy the contents of assets
folder of SQLCipher into assets
folder location. assets
folder contains the file icudt46l.zip
and you need to copy it to resources\mobile\native\android\assets
folder.For Android TAB devices:
Application Resource
folder from Kony Visualizer IDE and create the folder structure resources/customlibs/lib/tabrcandroid
, if does not exist already.libs
folder of SQLCipher into the resources/customlibs/lib/tabrcandroid
, if does not exist already. The SQLCipher libs
folder contains the two folders (armeabi
, x86
) and three jar files, copy all these files to the tabrcandroid
folder. konysqlcipher.jar
also into the tabrcandroid
folder. You can obtain the latest jar file from the Android build
folder [Ctrl + Alt + T] (the jar file is located in workspace\temp\<Application>\build\luatabrcandroid\extres
).resources\tablet\native\andriodtab\assets
, if does not exist already and copy the contents of assets
folder of SQLCipher into above location. SQLCipher assets
folder contains the icudt46l.zip
file and you need to copy it to resources\mobile\native\andriodtab\assets
folder.openDatabase()
call.
Copyright © 2013 Kony, Inc. All rights reserved. |