CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 5 of 5
  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 / EX MS MVP Power Poster
    Join Date
    Aug 2004
    Posts
    13,490

    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
    33°11'18.10"N 96°45'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
  •  





Click Here to Expand Forum to Full Width

Featured