Solved

Encrypting an Access Database

Posted on 2006-06-26
8
199 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
PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

 

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

Problems using Powershell and Active Directory?

Managing Active Directory does not always have to be complicated.  If you are spending more time trying instead of doing, then it's time to look at something else. For nearly 20 years, AD admins around the world have used one tool for day-to-day AD management: Hyena. Discover why

Question has a verified solution.

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

Entity Framework is a powerful tool to help you interact with the DataBase but still doesn't help much when we have a Stored Procedure that returns more than one resultset. The solution takes some of out-of-the-box thinking; read on!
Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
Email security requires an ever evolving service that stays up to date with counter-evolving threats. The Email Laundry perform Research and Development to ensure their email security service evolves faster than cyber criminals. We apply our Threat…

832 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