Encrypt database

cnicolapc

Active Member
Licensed User
Longtime User
Hi,
I need to encrypt and decrypt a database fields in a SQL database.
Can someone kindly give a practical example?
thanks
Nicola
 

cnicolapc

Active Member
Licensed User
Longtime User
hi,
I gave it a glance but I have not found anything as I have explained how to encrypt and decrypt database fields in a SQL database.
Thanks if anyone wants to help me
Nicola
 
Upvote 0

cnicolapc

Active Member
Licensed User
Longtime User
Hi,
return to the question even encrypt or decrypt SQL database, because I can not solve it alone and if someone has the patience to help me out I will be grateful.
I have a sql database "Archivio.db" I have a Customers table with the fields "LastName" ... etc. ...
They can encrypt the entire table or only one field at a time?
If I encrypt a field at a time as I can for:
Encrypt the field "LastName" as I do and how can I save in the table?
How I can decrypt the field "LastName" and use it.
I can perform queries on tables with encrypted fields.
If someone will want to answer with a practical example will be really useful for me.
Sorry for my bad english.
Nicola
 
Upvote 0

JesseW

Active Member
Licensed User
Longtime User
Android itself uses the SQLite db engine as part of the OS, but its implementation doesn't support encryption, so you must encrypt yourself manually by encrypting each field, which removes the capability to query the field, or use a standard db and encrypt the entire file, which introduces the possibility that the unencrypted file will somehow be left behind. But as of now, neither Android nor B4A support direct field encryption. Sorry... I'd like to have it too
 
Upvote 0

cnicolapc

Active Member
Licensed User
Longtime User
Thanks You
Thank you very much
So I have to resign, even if it's very limiting.
Nicola
So some programs use a commercial storage system, database owner?
 
Upvote 0

Djembefola

Active Member
Licensed User
Longtime User
Encrypt the field "LastName" as I do and how can I save in the table?
How I can decrypt the field "LastName" and use it.

I have attached a small example, that shows a simple way to encrypt and decrypt a single database field with agrahams encryption library.

You need to install encryption library and byteconverter library before you run the example program.
 

Attachments

  • EncryptedDatabaseExample.zip
    6.6 KB · Views: 577
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…