MySQL with C# Credential Security
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 5 of 5

Thread: MySQL with C# Credential Security

  1. #1
    Join Date
    Nov 2009
    Posts
    3

    MySQL with C# Credential Security

    I'm making a distributable DLL plugin for a program I currently use that hosts an API to expand it's functionality. I want to use MySQL in this plugin but I don't want some 10 year old decompiling my plugin and getting my source code.

    How can I make sure that the credentials I use for the application will not be compromised? The username and password will only be good for the certain tasks of the app but I still don't want it seen.

  2. #2
    Arjay's Avatar
    Arjay is offline Moderator / MS MVP Power Poster
    Join Date
    Aug 2004
    Posts
    11,254

    Re: MySQL with C# Credential Security

    Encrypt it.

  3. #3
    Join Date
    Nov 2009
    Posts
    3

    Re: MySQL with C# Credential Security

    Just the credentials or the entire code? And how?

  4. #4
    Join Date
    Nov 2009
    Posts
    3

    Re: MySQL with C# Credential Security

    bump

  5. #5
    Join Date
    Mar 2004
    Location
    3311'18.10"N 9645'20.28"W
    Posts
    1,808

    Re: MySQL with C# Credential Security

    Quote Originally Posted by Fearsoldier View Post
    ... but I don't want some 10 year old decompiling my plugin and getting my source code.
    use an obfuscator. but that has nothing to do with securing your db credentials.

    here are my suggestions:

    1. Encrypt / encode your credentials (creating a byte array containing the ascii character values of the username/password and use Encoding.ASCII.GetString(bytes) to retrieve the name/pw, is the simplest way, but there are a bit more secure approaches too)
    2. Use a web service instead of a local database (store all data remotely)
    3. If your addin system provides you the facilities to make addin configurations, then provide each user a place to provide a username / password, and create a user and grant access based on those credentials rather than hard coding it.
    4. Or, just don't worry about it...

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Azure Activities Information Page

Windows Mobile Development Center


Click Here to Expand Forum to Full Width

This is a CodeGuru survey question.


Featured


HTML5 Development Center