Android Question Solved:Encryption Initialization Creation

Shelby

Well-Known Member
Licensed User
Longtime User
My problem is that my project will no longer compile now that I have attempted to use SQLCipher invented by Zetetic.net.

On a tutorial by Erel,(https://www.b4x.com/android/forum/t...ryption-with-sqlcipher-library.14965/#content), Erel tells me to use the following line to initialize the SQLCipher method.

SQL1.Initialize(File.DirRootExternal, "1.db", True, DB_PASSWORD, ""):

Unfortunately, the IDE slips me the note; Undeclared variable 'SQL1' is used before it was assigned any value.

In actuality I don't have a variable SQL1 anyway, so how shall I change the wording to make it work for my project. I'll attach a screenshot of when the compilation goes haywire.... Whoops, the image was too large. Here's the wetransfer.com link:
https://we.tl/t-vXVH78nqBw

Of course my project is an SQLite one. It has 712 records
 
Solution
Your Additional Libraries path is this (see red border)
微信图片_20240630020631.png

but you put android-database-sqlcipher-4.5.4.aar into project folder not Additional folder
微信图片_20240630020722.png

You should put the android-database-sqlcipher-4.5.4.aar into folder C:\Users\HP\Desktop\Projects\Additional Libraries\B4A

微信图片_20240630021452.png

Shelby

Well-Known Member
Licensed User
Longtime User
Finally my friend here on the forum (Geoff T) has straightened me out. It appears that one of the primary mistakes I made was to think I could edit the code after the first time I built the project with the Cipher db Browser. Editing my records is as easy a task as ever but editing the code in the project can bring some unwanted results. Special thanks to Aeric and Teddybear for your patience and stamina while helping me.
 
Upvote 0
Top