Solved

Encrypting an Access Database

Posted on 2006-06-26
8
198 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 500 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
 

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
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Different Delete Messages 7 37
ASP.NET Web API or ASP.NET Core MVC? 3 52
Excel file not created as expected 7 50
Host asp.net pages 5 25
Extention Methods in C# 3.0 by Ivo Stoykov C# 3.0 offers extension methods. They allow extending existing classes without changing the class's source code or relying on inheritance. These are static methods invoked as instance method. This…
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…
This Micro Tutorial will give you a basic overview how to record your screen with Microsoft Expression Encoder. This program is still free and open for the public to download. This will be demonstrated using Microsoft Expression Encoder 4.
This Micro Tutorial demonstrates using Microsoft Excel pivot tables, how to reverse engineer competitors' marketing strategies through backlinks.

920 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

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now