Thomas,
 
Are you sure that encrypting the connection string  is what your network admin means?
 
When I hear someone say they want the logon encrypted I would think they mean store 
the password of a user encrypted in the db. That is, the application requires the user 
to logon and user info is stored in the db to logon against. When the user enters a 
username and password the password is encrypted and compared to an encrypted password 
in the db to validate the user.
 
I think you can use ssl to encrypt all communication between your app and the database 
but I don't know of a way to pass an encrypted connection string and have the db 
decrypt it before it makes a connection. My ignorance doesn't mean its not possible so 
maybe someone else can suggest something.
 
If the idea is to prevent someone from seeing your code and learning a db logon I 
guess you could store the connection string encrypted in a config file for your app 
then decrypt it before you connect. You'd have to use an encryption that can be 
decrypted with a key.
Checkout the System.Security.Cryptography.DESCryptoServiceProvider class
 
Hope that helps,
 
Joe Audette

Thomas Trutt <[EMAIL PROTECTED]> wrote:
Hello all,

Ok i know this may be a simple question but i need a little help. 
I am writing a program in VB.net that uses MySQL as a backend. My net admin 
wants the log on to be encrypted??

This is currently how i am connecting:

Public LocalSYS As New OdbcConnection("DRIVER={MySQL ODBC 3.51 
Driver};" & _
"SERVER=192.168.0.1;" & _
"DATABASE=DB;" & _
"UID=User;" & _
"PASSWORD=Password;" & _
"OPTION=3;")

As you can see its a public variable that i have declared so that i don't 
have to continuously add it for every form in the program.. So the question 
i have is how do i change this so that it is encrypted??? Any ideas and 
suggestions would be greatly appreciated..

Many thanks,

Tom T 

[EMAIL PROTECTED]
http://www.joeaudette.com
http://www.mojoportal.com

Reply via email to