?
Solved

Encrypting an Access Database

Posted on 2006-06-26
8
Medium Priority
?
216 Views
Last Modified: 2010-04-16
Greetings,

I have a need to quickly add a bit of secrecy to a database I'll be leaving on the customer's site.  Is there a way to read and write encrypted data?

Thanks,
Bob



0
Comment
Question by:ba272
  • 4
  • 4
8 Comments
 
LVL 27

Accepted Solution

by:
Chinmay Patel earned 2000 total points
ID: 16989961
Hi There,

There are two ways you can do this :
1. Encrypt the Access database with a strong password.
2. Encrypt the data you are writing to the database.

The first one can be done via Tools -> Security - Set Database Password...

and for second one you can use any available encryption method available with .Net.

If you need more information just let me know.

Regards,
Chinmay

0
 

Author Comment

by:ba272
ID: 16992556
Chinmay,

Thanks.  How long a password is needed to be called "Strong"?  And once I've set the password in Access, how do I open it from C#?

I use OleDbConnection.  Would I add the folowing to the ConnectionString property?

Pwd=123;

I have no need to enter a "User ID", right?

Thanks,
Bob

PS I prefer the first method for now.  It should be much quicker to implement, and I need the data to be human readable without me needing to transpose it.
0
 
LVL 27

Expert Comment

by:Chinmay Patel
ID: 16993780
Hi There,

"Strong" as far as computer security is concerned, is a very, relative term. A Strong password for me can be a piece of cake for a skilled person to break. So I leave it upto you to set up a Strong password. If you google around you'll get what is the best Strong password in your situation. Generally more than 6 alphanumeric characters(it should form non dictionary word) and 3-4 special characters is sufficient, however I still suggest you to evaluate this from your propectives too.

Here are sample connection strings:
Standard security:
"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=\somepath\mydb.mdb;User Id=admin;Password=;"

 Workgroup (system database):
"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=\somepath\mydb.mdb;Jet OLEDB:System Database=system.mdw;"

With password:
"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=\somepath\mydb.mdb;Jet OLEDB:Database Password=MyDbPassword;"

and for future reference, you can bookmark this site: http://www.connectionstrings.com

Regards,
Chinmay
0
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 

Author Comment

by:ba272
ID: 16995863
Thanks.  One last question:

I use the free version of Dotfuscator and am not too keen on upgrading at the moment.  The free version does not obfuscate text strings.  Any ideas about how to build that password string on the fly in a way which would not take me lots of coding?

Thanks for all the help.

0
 
LVL 27

Expert Comment

by:Chinmay Patel
ID: 16995931
Hi There,

You can use Aspose Obfuscator free version.
http://www.aspose.com/Products/Aspose.Obfuscator/Downloads.html

or else you can get an encryption library from here to use with your application.
http://www50.brinkster.com/cspatel/CodeBase/CryptoAPI.zip

its very simple to use, all you'll have to do is store encrypting string in a predefined variable
and decrypt it whenever you need in your application.

Regards,
Chinmay
0
 

Author Comment

by:ba272
ID: 16996502
thanks a bunch.

Bob
0
 

Author Comment

by:ba272
ID: 17028744
I had trouble getting the encryption project to open.  I both dragged the files out of the zip file and extracted all.  But when I open the project, the tree in the Class View fails.

As far as switching to another obfuscator, do you have any experience with this?  It's a big deal to switch from Dotfuscator.  And if I could obfucate the string values I'd be able to stick with the free one.  

Is there any other way to obfuscate string values?

Thanks,
Bob
0
 
LVL 27

Expert Comment

by:Chinmay Patel
ID: 17029627
Hi There,

I am sorry, there is no known free obfuscatoor as per my knowledge that will encrypt strings too.

I'll still search around, lets see what I can find.

Regards,
Chinmay
0

Featured Post

Important Lessons on Recovering from Petya

In their most recent webinar, Skyport Systems explores ways to isolate and protect critical databases to keep the core of your company safe from harm.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In order to hide the "ugly" records selectors (triangles) in the rowheaders, here are some suggestions. Microsoft doesn't have a direct method/property to do it. You can only hide the rowheader column. First solution, the easy way The first sol…
The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
In a question here at Experts Exchange (https://www.experts-exchange.com/questions/29062564/Adobe-acrobat-reader-DC.html), a member asked how to create a signature in Adobe Acrobat Reader DC (the free Reader product, not the paid, full Acrobat produ…
Loops Section Overview
Suggested Courses

840 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question