Android Question where is the best method for encryption DB?

SMOOTSARA

Active Member
Licensed User
Longtime User
Hello friends:)

I encoded 3 column of the database with the B4XEncryption library
But my database size has increased a lot
What suggestion do you have to hide data in the database?

Thank you for your guidance;)
 

KMatle

Expert
Licensed User
Longtime User
Are you talking about SQlite? You can use it with encryption. Take a search. By the way there's always an overhead using encryption. Search Google, too for an answer because it's a general question how to secure db's.
 
Upvote 0

MarkusR

Well-Known Member
Licensed User
Longtime User
a simple encryption:
bitwise exclusive OR (XOR) let the size the same.
you can xor byte for byte with a keyword.
if you do this again you have back your original.
 
Upvote 0

SMOOTSARA

Active Member
Licensed User
Longtime User
Are you talking about SQlite? You can use it with encryption. Take a search. By the way there's always an overhead using encryption. Search Google, too for an answer because it's a general question how to secure db's.
a simple encryption:
bitwise exclusive OR (XOR) let the size the same.
you can xor byte for byte with a keyword.
if you do this again you have back your original.

hi friends
my database has 17000 record
before encryption size is 21 Mb after encryption is 250Mb
database is sqlite with 5 column

I'm worried after the release of the program
If my apk is crack, the database is readily read:(
 
Upvote 0

MarkusR

Well-Known Member
Licensed User
Longtime User
are you sure that is the encryption size 10x?
some databases let deleted records in until a cleaning task run.
 
Upvote 0

MarkusR

Well-Known Member
Licensed User
Longtime User
that every cell contains a long Json
oh, that wil expand your db surely
 
Last edited:
Upvote 0

OliverA

Expert
Licensed User
Longtime User
Upvote 0

OliverA

Expert
Licensed User
Longtime User
that every cell contains a long Json
You could also compress the JSON first (use CompressedStreams class from RandomFileAccess library), then XOR the resulting byte array.
 
Upvote 0
Top