Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Java Development

Reply
Developer
Posts: 174
Registered: ‎01-25-2011
My Device: Not Specified

How to generate the code signing key for database encryption??

Hi,

 

I need an encrypted database for my application,  for which i have choosen to use encryption of database using code signing keys. Now the issue is the generation of code singning key(.key file). Can any one guide me in the generation of code signing key, which could be used to encrypt the database, to make it unusable to other applications.

Developer
Posts: 141
Registered: ‎07-13-2011
My Device: BB Bold
My Carrier: Vodafone

Re: How to generate the code signing key for database encryption??

See this code

 

DatabaseFactory.create(fileURI, new DatabaseSecurityOptions(true));

 

I think you should read the docs which are very helpful, i use version 5.0

 

See the docs for class  DatabaseSecurityOptions  and DatabseFactory

 

Developer
Posts: 174
Registered: ‎01-25-2011
My Device: Not Specified

Re: How to generate the code signing key for database encryption??

I have implemented it, but my proj requirement is that the .db file should remain unaccessable frm other apps as well, so i need the database file to be encrypted using code signing keys which is unique to applicaiton.
Developer
Posts: 141
Registered: ‎07-13-2011
My Device: BB Bold
My Carrier: Vodafone

Re: How to generate the code signing key for database encryption??

If you use the same signing key for all the projects then yes they can access ur database.

 

But if you used a single key to sign ur specific project and its DB , then no other app can access it.

 

Developer
Posts: 174
Registered: ‎01-25-2011
My Device: Not Specified

Re: How to generate the code signing key for database encryption??

It is different frm signing the app... Have a look at the following link

http://docs.blackberry.com/en/developers/deliverables/17952/Protecting_a_SQLite_database_1219777_11....

Just go to the "Encryption and protection" part... U will get the idea!!